formData problem with uploader component

edited June 4 in Technical questions

I have a dialog with uploader component, and i'm trying to use send function to send file on backend, but I also need to send some other params in request.

I'm trying to achieve it by changing formData component of uploader, but it doesnt work. What I am doing wrong?

https://i.imgur.com/TnXKcqD.png

https://i.imgur.com/sNSHb7f.png

This is what i get in my request. Why I don't see "opis" and "korisnikId" params?

https://i.imgur.com/87G41lT.png

Also, when I am debugging, after defining formData, I can see it really set that data with $$("previewFileDialogFileUploader").data.formData, but it's not send in request.

Thanks.

Tagged:

Comments

  • Hi @dullex ,

    There are several ways to add formData during the file uploading.
    Please, check the following snippet (localValues are set for each file and may vary, globalValues are for all files in uploader) : https://snippet.webix.com/cz2tiytx

    Your code from the screenshot seems valid, so please specify the Webix version and, if possible, provide a snippet which will illustrate the issue.

  • You were right, adding new webix to project helped, so it was problem with outdated version.

    Next time I will check that first.

    Thanks for your help, as always.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion