Skip to content

Commit

Permalink
fix: add filename to s3 upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Sep 13, 2024
1 parent f140daf commit 11ca14a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/src/lib/components/ArgInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@
randomFileKey={true}
on:addition={(evt) => {
value = {
s3: evt.detail?.path ?? ''
s3: evt.detail?.path ?? '',
filename: evt.detail?.filename ?? ''
}
}}
on:deletion={(evt) => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/components/LightweightArgInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@
randomFileKey={true}
on:addition={(evt) => {
value = {
s3: evt.detail?.path ?? ''
s3: evt.detail?.path ?? '',
filename: evt.detail?.filename ?? ''
}
}}
on:deletion={(evt) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
const outputs = initOutput($worldStore, id, {
result: [] as { path: string }[] | undefined,
result: [] as { path: string; filename: string }[] | undefined,
loading: false,
jobId: undefined
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
})
return
}
dispatch('addition', { path: uploadData.path })
dispatch('addition', { path: uploadData.path, filename: fileToUpload.name })
sendUserToast('File upload finished!')
uploadData.progress = 100
Expand Down

0 comments on commit 11ca14a

Please sign in to comment.