mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
Prevent slashes in folder names for storage explorer
This commit is contained in:
1 parent
69a2f2d121
commit
f280ca24d8
1 file changed
+4
@@ -275,9 +275,13 @@ class StorageExplorerStore {
|
||||
addNewFolder = async (folderName, columnIndex) => {
|
||||
const autofix = false
|
||||
const formattedName = this.sanitizeNameForDuplicateInColumn(folderName, autofix, columnIndex)
|
||||
|
||||
if (isNull(formattedName)) {
|
||||
return
|
||||
}
|
||||
if (formattedName.includes('/') || formattedName.includes('\\')) {
|
||||
return toast.error('Folder names should not have forward or back slashes.')
|
||||
}
|
||||
if (formattedName.length === 0) {
|
||||
return this.removeTempRows(columnIndex)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user