Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JQuey-upload-file update formData is not working #199

Open
diegoalbgr opened this issue Jun 10, 2020 · 1 comment
Open

JQuey-upload-file update formData is not working #199

diegoalbgr opened this issue Jun 10, 2020 · 1 comment

Comments

@diegoalbgr
Copy link

diegoalbgr commented Jun 10, 2020

Hi, I have been trying to update the formData with the option "update" but when I update, it keep the old information.

This is my code:

var filesDataObj;

filesDataObj = $("#fileuploader").uploadFile({
            url: "someURL",
            multiple: true,
            dragDrop: true,
            fileName: "mallFiles",
            autoSubmit: false,
            formData: { "userID": 6, "statusID": 20 },
            onError: function (files, status, errMsg, pd) {
                console.log("Error: ");

                console.log(status);

                console.log(errMsg);
            }
        });


filesDataObj.update({

            formData: {
                "patientID": parseInt($("#patient_id").val()),
                "appointmentID": hospitalResponse.HospitalData.patientAppointment
            }

        });

Also thanks for the plugin, it still works in 2020 👍

@yuranikspb
Copy link

yuranikspb commented Aug 31, 2020

i check this function and it work
some thing else wrong

this.update = function (settings) {
            //update new settings
        s = $.extend(s, settings);
			//We need to update action for already created Form.            
            if(settings.hasOwnProperty('url'))
            {
            	$("form").each(function(i,items)
		   		{
					$(this).attr('action',settings['url']);
		   		});
            }
            
            
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants