Use Webdav PUT for uploads#21237
Conversation
7054253 to
a3ca184
Compare
cb4467a to
9feacc4
Compare
There was a problem hiding this comment.
@DeepDiver1975 @evert is this acceptable or have a gone too far 😉
I wanted to replace the old ajax/upload.php and use Webdav PUT for uploads.
However old browsers like IE8/IE9 need an iframe transport and do a POST, so this plugin catches that and forwards the call to createFile / updateFile and checks preconditions.
Goal is to bring the code paths as close as possible.
What do you think ?
There was a problem hiding this comment.
also @LukasReschke in case of security considerations. I added the CSRF check here, but we can probably move it to a generic plugin or the auth plugin.
There was a problem hiding this comment.
Don't really see anything wrong with it. You could even take it one step further by creating a $subRequest / $subResponse and sending that to Server::invokeMethod as a more generic approach.
There was a problem hiding this comment.
Ah! That's the kind of thing I was looking for 😄 Thanks!
Problem though is that I need to post-process the response to repackage it as JSON.
I'll have a look if that's possible.
|
Will do autorename using Webdav POST on the collection with suggested name, as per RFC 5995 http://greenbytes.de/tech/webdav/rfc5995.html (starting to like that one!) |
|
And here we go, autorename implemented based on RFC 5995. So cool!
|
96e9454 to
ef903f4
Compare
|
I'm still wondering whether it's ok to have all these extra PROPFIND after upload, or whether we should try and return all the needed info through headers... |
|
Here are some ideas to remove the extra PROPFIND on after upload:
|
|
Would be even easier if we could just return a JSON blob (or the result of XML PROPFIND) as a result of the PUT request. |
|
I don't think there's any problems with doing stuff with the response to a |
ef903f4 to
5e88bef
Compare
|
@evert so I guess it might be better to return information as headers instead ? That's what we party did so far: Keeping the subsequent PROPFIND is so easy... but some people might complain about performance. |
|
Well, there's another idea.. you could add a specific header to |
|
c78916c to
b672770
Compare
|
IE8 will not be supported for 9.0, see #15567 (comment)
|
|
🎉 |
|
Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo IE9 also requires the iframe transport. |
|
Rebased. Some JS tests will fail, need to look into it. |
|
The plan is as follows:
|
- uses PUT method with jquery.fileupload for regular and public file lists - for IE and browsers that don't support it, use POST with iframe transport - implemented Sabre plugin to handle iframe transport and redirect the embedded PUT request to the proper handler - added RFC5995 POST to file collection with "add-member" property to make it possible to auto-rename conflicting file names - remove obsolete ajax/upload.php and obsolete ajax routes
Not needed any more in IE >= 11
Hacked around Blueimp's jquery.fileupload to make it work with our new chunking API.
Ready for review @DeepDiver1975 @butonic @owncloud/qa |
1d9bfac to
a89f4f0
Compare
|
Really nice! 👍 That being said I cannot even login in IE8: I reverted to 8308348 to see if it was caused by the move to make, but I get the same errors there. I tried IE11 in IE8 emulation and the Win7 IE8 VM: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ @DeepDiver1975 @PVince81 @felixboehm de we still support IE8? |
|
Ie8 support is long gone |
|
That said - we should prevent users from logging in with unsupported browsers |
|
Ok, IE9, uploading a 300mb video fails: |
|
@butonic In oC 9.1 IE9 is no longer supported. Here are the supported web browsers for oC 9.1. Web browser: IE11+ (except Compatibility Mode), Firefox 14+, Chrome 18+, Safari 5+ https://doc.owncloud.org/server/9.1/admin_manual/installation/system_requirements.html |
|
I scanned the thread from the start and stumbled over IE8 and IE9 ... reading thoroughly would have helped: #21237 (comment) sorry for the noise so a 👍 from me |
|
@butonic yeah, because when I started we still wanted to support IE8 and I had a workaround with an iframe transport plugin... then killed it again when we killed IE9. Thanks for the reviews. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #4380
make ajax/upload.php as close as possible to webdav upload (for IE8 to reduce code paths)Test cases