Questions tagged as 'formdata'

0
answers

ServiceWorker save form

I'm currently handling the fetch events in my ServiceWorker as follows: self.addEventListener('fetch', event => { // For 'POST' method if ( event.request.method !== 'GET' && event.request.method !== 'HEAD' &&...
asked by 04.08.2018 / 06:10
1
answer

upload with ajax and formdata displays error

I'm trying to send a file to the server with ajax and php. I've tried variations with people who had doubts on the same subject but nothing works (I'm sure I'm doing some bullshit). I have a form with 4 fields, one of them is file type. I do all...
asked by 09.07.2018 / 17:47
0
answers

How to use jquery validate with FormData Object

I have a form with 3 fields being one of type file. Validation works perfectly. When I try to send data using ajax, I get the error: "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data". When checking with the...
asked by 09.07.2018 / 06:49
1
answer

FormData: Why does the URL appear undefined?

The idea is to take the value from the input [name="path"] and use it as the url value of the method AJAX. But my console is showing that this value is Undefined . I could not figure out why yet. My HTML: <a class="rtrn-con...
asked by 04.06.2018 / 19:05
0
answers

File Upload with FormData without input file

I'm working with the cordova, and it does not support the input file of the html. I would like to know if some way to send an image of the file by the formData method of ajax. I tried to send the image as Blob to my database, but I can not br...
asked by 15.04.2018 / 19:57
1
answer

Input file as append in FormData

How can I insert images as append into a FormData ? I'm trying this way, but when I use console.log to check the dados variable, imagens is empty. var dados = new FormData(); $('.copiar-elemento').each(function...
asked by 08.04.2018 / 23:46
1
answer

Put Variable within FormData

How can I put a jquery variable inside FormData? Example: I have a CKEDITOR, however I am not able to save in the database, but I am using the ajax send format, which I found on a website, to upload images, and this way, uses FormData, how...
asked by 13.01.2018 / 22:47
1
answer

How to concatenate serialized data from a form to the javascript string? [closed]

How can I concatenate a serialized data variable var dados = $(form).serialize(); with a second variable, for example var x ="2222" ? Thank you for your attention! Horacio     
asked by 22.11.2018 / 17:59