-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/tus upload #3345
Feature/tus upload #3345
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start!
src/plugins/upload.js
Outdated
methods: { | ||
uploadChunkedFile(file) { | ||
const upload = new tus.Upload(file, { | ||
endpoint: this.$client.helpers._webdavUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll need to extract the path from the file name and append it to the endpoint.
as far as I understand the metadata should only contain the basename of the file name, not the full path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'll adjust it 😉
src/plugins/upload.js
Outdated
}, | ||
|
||
onError: error => { | ||
console.error(error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reject the promise here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also thinking about this but I want to test how does it behave when retrying the upload. AFAICT this will be triggered every time when the upload fails and rejecting it before retry feels a bit odd to me.
Do all code paths lead to this FileUpload location ? I guess we might need to detect public page mode and fall back to regular upload there |
For #67 |
we should be able to test this with cs3org/reva#661 once ready |
This is only for file upload. Folder and d&d are not part of this. I put it only here for now for test purpose. When I'll be able to test it and will see it will work I'll move it to the others and disable it for public links. |
@LukasHirt please rebase at the next opportunity so we get |
917cf0c
to
f70466c
Compare
Done |
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9426/
|
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9427/
|
|
|
|
|
|
|
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9430/
|
|
724d3db
to
8ede86f
Compare
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9453/
|
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9456/
|
|
|
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9457/
|
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9458/
|
💥 Acceptance tests webUIOCIS failed. Please find the screenshots inside ...https://drone.owncloud.com/owncloud/phoenix/9459/
|
For implementing the TUS detection capability, the following tasks remain:
|
TUS capability is now working. I had to fix chunked upload as we mistakenly included the file name in the endpoint URL. Now requires the other PRs to be merged. |
cool, I did not spot your butonic/reva#4 ... I created cs3org/reva#674 yesterday. Can you check if that includes butonic/reva#4 |
@butonic I tested now with cs3org/reva#674 and we're getting a CORS error on the PATCH request, missing the "Authorization" header. As I remember this should have been fixed by owncloud/ocis-reva#136 but doesn't work even though I am using the latest master from ocis-reva. |
|
|
f562697
to
6dc0246
Compare
@LukasHirt I've added the following:
I've squashed everything into a single commit. I was able to test many of the checkboxes using the tus-dataprovider branch (and bypass the capability check) because tus-ocdav is currently broken, see cs3org/reva#674 (comment) |
Added chunked upload with tus-js-client if the server supports it. Co-authored-by: Vincent Petry <pvince81@owncloud.com>
6dc0246
to
b2db7ba
Compare
Tiny addition: added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This has now introduced a little console annoyance when running against OC 10: owncloud/owncloud-sdk#462 |
Description
Use tus-js-client to upload files