diff --git a/object/init.go b/object/init.go
index 93033c2..68fad5b 100644
--- a/object/init.go
+++ b/object/init.go
@@ -67,7 +67,7 @@ func initBuiltInProvider() {
DisplayName: "Built-in Storage Provider",
Category: "Storage",
Type: "Local File System",
- ClientId: "F:/github_repos/casdoor-website",
+ ClientId: "C:/casibase_storage",
}
_, err = AddProvider(provider)
if err != nil {
diff --git a/storage/local_file_system.go b/storage/local_file_system.go
index f658fb4..6a90476 100644
--- a/storage/local_file_system.go
+++ b/storage/local_file_system.go
@@ -70,7 +70,7 @@ func (p *LocalFileSystemStorageProvider) ListObjects(prefix string) ([]*Object,
}
func (p *LocalFileSystemStorageProvider) PutObject(user string, parent string, key string, fileBuffer *bytes.Buffer) error {
- fullPath := p.path
+ fullPath := filepath.Join(p.path, key)
err := os.MkdirAll(filepath.Dir(fullPath), os.ModePerm)
if err != nil {
diff --git a/web/src/FileTree.js b/web/src/FileTree.js
index ca54c3c..c552159 100644
--- a/web/src/FileTree.js
+++ b/web/src/FileTree.js
@@ -176,11 +176,16 @@ class FileTree extends React.Component {
Promise.all(promises)
.then((values) => {
- Setting.showMessage("success", "File uploaded successfully");
- this.props.onRefresh();
+ const res = values[0];
+ if (res.status === "ok") {
+ Setting.showMessage("success", "File added successfully");
+ this.props.onRefresh();
+ } else {
+ Setting.showMessage("error", `File failed to add: ${res.msg}`);
+ }
})
.catch(error => {
- Setting.showMessage("error", `File failed to upload: ${error}`);
+ Setting.showMessage("error", `File failed to add: ${error}`);
});
}
diff --git a/web/src/StoreListPage.js b/web/src/StoreListPage.js
index d40a065..f1641e0 100644
--- a/web/src/StoreListPage.js
+++ b/web/src/StoreListPage.js
@@ -147,6 +147,14 @@ class StoreListPage extends React.Component {
return null;
}
+ if (text.includes("local") || text.includes("built-in")) {
+ return (
+
+ {text}
+
+ );
+ }
+
return (
{text}