我想使用 JQuery-File-Upload 上传文件,但使用 HTTP“PUT”而不是 multipart-forms。 According to their site :
- Multipart and file contents stream uploads:
Files can be uploaded as standard "multipart/form-data" or file contents stream (HTTP PUT file upload).
但我在他们的文档中找不到任何关于如何执行此操作的信息。谁能帮忙?
最佳答案
根据:https://github.com/blueimp/jQuery-File-Upload/wiki/Options
method
The method of the HTTP request used to send the file(s) to the server. Can be POST (multipart/formdata file upload) or PUT (streaming file upload). Accepts a String or a function returning a String.
你应该使用:
$('#file_upload').fileUpload({
namespace: 'file_upload_1',
url: '/path/to/upload/handler.json',
method: 'PUT'
});
关于javascript - 如何使用 JQuery 使用 HTTP "PUT"上传文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5518420/