refactor file system operations
the most notable improvement is that uploads are now using streams so they no longer require the entire file to be stored in memory
This commit is contained in:
@@ -54,7 +54,7 @@ function onFilesChanged(event: Event) {
|
||||
|
||||
if (uploadStore.destination == null) {
|
||||
uploadStore.destination = warrenStore.current;
|
||||
} else if (currentAndUploadRouteMatch.value) {
|
||||
} else if (!currentAndUploadRouteMatch.value) {
|
||||
toast.warning('Upload', {
|
||||
description:
|
||||
'The unfinished items belong to a different directory. Remove them before attempting to upload to a different directory.',
|
||||
|
||||
@@ -24,7 +24,10 @@ function createObjectUrl(file: File): string {
|
||||
{ 'p-2': !file.data.type.startsWith('image/') },
|
||||
]"
|
||||
>
|
||||
<div v-if="file.status === 'not_uploaded'" class="h-full w-full">
|
||||
<div
|
||||
v-if="file.status === 'not_uploaded'"
|
||||
class="flex h-full w-full items-center justify-center"
|
||||
>
|
||||
<img
|
||||
v-if="file.data.type.startsWith('image/')"
|
||||
:src="createObjectUrl(file.data)"
|
||||
|
||||
Reference in New Issue
Block a user