You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
fix: abort upload behavior to properly handle server-side deletion and frontend state reset (#3114)
* Fixed an issue where aborting an upload would not delete the partial upload from the server. Also fixed an issue where the abortAll function wasn't resetting and reloading the frontend properly * Add server-side tus delete handler --------- Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
This commit is contained in:
@@ -74,7 +74,6 @@ export default {
|
||||
"getETA",
|
||||
]),
|
||||
...mapWritableState(useFileStore, ["reload"]),
|
||||
...mapActions(useUploadStore, ["reset"]),
|
||||
formattedETA() {
|
||||
if (!this.getETA || this.getETA === Infinity) {
|
||||
return "--:--:--";
|
||||
@@ -92,6 +91,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUploadStore, ["reset"]), // Mapping reset action from upload store
|
||||
toggle: function () {
|
||||
this.open = !this.open;
|
||||
},
|
||||
@@ -100,8 +100,8 @@ export default {
|
||||
abortAllUploads();
|
||||
buttons.done("upload");
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.reload = true;
|
||||
this.reset(); // Resetting the upload store state
|
||||
this.reload = true; // Trigger reload in the file store
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user