Web page for uploading a file with HTTP PUT from browser
Is it possible to make a web page that would let userr to upload a file to the server using HTTP PUT? Which browsers that would work with?
The primary reason for preferring specifically PUT is that it's handled more optimally on the server (i.e. without extra parsing of the request).
I know it's possible at least using a java applet or something similar, but I'm only interested with default configuration of at least some browsers (and preferably without javascript too, if possible).
I开发者_JAVA百科 have found some mentions of xhtml2.0 (xforms1.1) regarding that, but how to do that is still very unclear to me.
- It can't be done without JavaScript.
- In browsers that do support it, you can make PUT requests with XHR but
- Support is not universal
- You can't read files from the user's file system
A POST request is probably the way to go.
I have found some mentions of xhtml2.0 (xforms1.1) regarding that, but how to do that is still very unclear to me.
Browsers don't support this.
It is possible on the server side to accept a PUT request with a script (PHP for example), but it would not make anything more optimal. You would still have to check for legal filenames, permissions etc.
精彩评论