mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
do a best effort of moving files
right now it bails even if one file cannot be moved
This commit is contained in:
1 parent
25e3466412
commit
94dbcd5ff1
1 file changed
+4
-2
@@ -1126,11 +1126,13 @@ class StorageExplorerStore {
|
||||
.concat(pathSegments.slice(columnIndex + 1))
|
||||
.join('/')
|
||||
return () => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
return new Promise(async (resolve) => {
|
||||
const { error } = await this.supabaseClient.storage
|
||||
.from(this.selectedBucket.name)
|
||||
.move(fromPath, toPath)
|
||||
if (error) reject()
|
||||
if (error) {
|
||||
toast.error(`Failed to move ${fromPath} to the new folder`)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user