-
Notifications
You must be signed in to change notification settings - Fork 156
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
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳👏🎉
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
packages/web-app-files/src/components/AppBar/Upload/FileUpload.vue
Outdated
Show resolved
Hide resolved
publicLinkPassword | ||
}), | ||
currentPath, | ||
uploadPath |
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
Okay for now, but please check my remaining comments in the follow up ticket/PRs
@@ -249,6 +250,15 @@ export const announceClientService = ({ | |||
vue.prototype.$clientService.owncloudSdk = sdk | |||
} | |||
|
|||
/** | |||
* announce uppyService and owncloud SDK and inject it into vue |
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.
no owncloud SDK here
SonarCloud Quality Gate failed. |
🎉 🥳 👏🏻 🥳 🎉 |
Description
We've implemented Uppy as a library for handling uploads. This concludes the following features and changes:
vue2-dropzone
andvue-drag-drop
librariesRelated Issue
Screenshots
Types of changes
Checklist:
Open tasks/enhancements: #6819