Skip to content

Commit

Permalink
Slight adjustments after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed May 3, 2022
1 parent 5ed5f35 commit 3f22725
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ export default defineComponent({
resource = buildResource(resource)
this.$uppyService.$emit('uploadedFileFetched', file, resource)
this.$uppyService.publish('uploadedFileFetched', {
uppyResource: file,
fetchedFile: resource
})
// Update table only if the file was uploaded to the current directory
if (fileIsInCurrentPath) {
Expand Down
7 changes: 6 additions & 1 deletion packages/web-app-files/src/views/FilesDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ export default {
},
onFileSuccess(uppyResource) {
this.$uppyService.$emit('uploadedFileFetched', uppyResource, { name: uppyResource.name })
this.$uppyService.publish('uploadedFileFetched', {
uppyResource,
fetchedFile: {
name: uppyResource.name
}
})
},
onFileError(error) {
Expand Down
4 changes: 2 additions & 2 deletions packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default {
this.closeInfo()
}
})
this.$uppyService.subscribe('uploadedFileFetched', (uppyResource, fetchedFile) => {
this.$uppyService.subscribe('uploadedFileFetched', ({ uppyResource, fetchedFile }) => {
this.successfulUploads.push({
...fetchedFile,
targetRoute: uppyResource.meta.route
Expand Down Expand Up @@ -161,7 +161,7 @@ export default {
query: targetRoute.query,
params: {
...(storageId && path && { storageId }),
storage: targetRoute.params?.storage
...(targetRoute.params?.storage && { storage: targetRoute.params?.storage })
}
}
Expand Down

0 comments on commit 3f22725

Please sign in to comment.