Does anyone know how to upload a file using a form and then have jquery intercept it, modify the file and then send it off with ajax using http PUT instead of POST? I've tried using the jquery form plugin, but it doesn't work with PUTs, has anyone else had to do something like this before? An example would be very helpful.
Asked
Active
Viewed 3,056 times
0
-
possible duplicate of [How to upload a file using an HTTP "PUT" using JQuery?](http://stackoverflow.com/questions/5518420/how-to-upload-a-file-using-an-http-put-using-jquery) – Zsolt Botykai Jun 01 '12 at 07:03
2 Answers
1
http://homework.nwsnet.de/news/9132_put-and-delete-with-jquery
That is some example code to get you started. You just have to add a method for put

secretformula
- 6,414
- 3
- 33
- 56
-
do you know how I can obtain the "data" to feed into the function from my form's file upload? – swoosh May 31 '12 at 20:57
-
http://stackoverflow.com/questions/5518420/how-to-upload-a-file-using-an-http-put-using-jquery This is a duplicate question – secretformula May 31 '12 at 21:01
1
Just pass in a "type" key.
$.ajax({
url: 'ajax/test.html',
type: 'PUT'
});
Note that PUT is not supported by all browsers.

Porco
- 4,163
- 3
- 22
- 25