Repository navigation
[full-ci] Switch upload logic to Uppy - #6202
Conversation
4350fbf to
9c8a40d
Compare
|
I've rebased this PR on #6662 since simplifying the AppBar made the switch to Uppy way easier (we can&should change PR targets back to master once #6662 is merged, obviously). There's a couple of pitfalls and decisions to take still, but confident that the codebase & project profits even from merging a "simpler" version (e.g. without "Resume" button") |
64e7cf4 to
4a29b02
Compare
|
Results for oC10SharingPublic2 https://drone.owncloud.com/owncloud/web/24948/38/1 |
365aef6 to
a0e8e35
Compare
49688aa to
30def9c
Compare
c8e71ce to
a866a98
Compare
e27ed15 to
d4143c1
Compare
There was a problem hiding this comment.
🥳👏🎉
This is very nice!
It has a bunch of rough edges, we might want to move things around a bit still (and I would like to hear opinions of the others), but I feel we're heading in the right direction. I'm only worried that composables and the service interaction/relation feel slightly chaotic still... not sure yet, how we can improve that
Most of the comments I left are basically reminders for myself, so we can talk about it again.
Bare with my typos and rather short sentences, I am typing on my phone 😅
| await this.createDirectoryTree(files) | ||
| await this.updateStoreForCreatedFolders(files) | ||
| this.$uppyService.uploadFiles(files) | ||
| }, |
There was a problem hiding this comment.
I'm not so happy with this, it kind of feels the service should handle this - but we have so many dependencies here that are weird to get in a service... totally unsure about that.
At least we can move this function to the composable.
| publicLinkPassword | ||
| }), | ||
| currentPath, | ||
| uploadPath |
There was a problem hiding this comment.
I see good reasons for having currentPath and uploadPath computed in the composable vs having them passed in.... not sure
There was a problem hiding this comment.
A good reason for it being passed to the composable is that those props might vary. The FileDrop component e.g. has a completely other upload path.
| const storageId = params.storageId | ||
| const webDavPath = storageId | ||
| ? buildWebDavSpacesPath(storageId, `${currentFolder}${directory}`) | ||
| : buildWebDavFilesPath(unref(user)?.id, `${currentFolder}${directory}`) |
There was a problem hiding this comment.
I'm wondering... what should happen if the unref'ed user is null or undefined? We might error out early as well, no?
| import { UppyResource } from '../composables/upload' | ||
| import Vue from 'vue' | ||
|
|
||
| export class UppyService extends Vue { |
There was a problem hiding this comment.
We used this as a quick hack, to port away from events on the $root instance. Do we have a better provider for the $on, $off and $emit functionality. EventBus maybe?
029b1e6 to
b0dbdd0
Compare
dschmidt
left a comment
There was a problem hiding this comment.
Okay for now, but please check my remaining comments in the follow up ticket/PRs
| } | ||
|
|
||
| /** | ||
| * announce uppyService and owncloud SDK and inject it into vue |
|
SonarCloud Quality Gate failed. |
|
🎉 🥳 👏🏻 🥳 🎉 |










Description
We've implemented Uppy as a library for handling uploads. This concludes the following features and changes:
vue2-dropzoneandvue-drag-droplibrariesRelated Issue
Screenshots
Types of changes
Checklist:
Open tasks/enhancements: #6819