Unverified Commit 1a8310f0 authored by boojack's avatar boojack Committed by GitHub

chore: update system setting default value (#1665)

parent 041be467
......@@ -137,7 +137,7 @@ func (s *Server) registerResourceRoutes(g *echo.Group) {
if err != nil && common.ErrorCode(err) != common.NotFound {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find local storage path setting").SetInternal(err)
}
localStoragePath := ""
localStoragePath := "assets/{timestamp}_{filename}"
if systemSettingLocalStoragePath != nil {
err = json.Unmarshal([]byte(systemSettingLocalStoragePath.Value), &localStoragePath)
if err != nil {
......
......@@ -44,7 +44,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
AllowSignUp: false,
IgnoreUpgrade: false,
DisablePublicMemos: false,
MaxUploadSizeMiB: 32, // this is the frontend default value
MaxUploadSizeMiB: 32,
AdditionalStyle: "",
AdditionalScript: "",
CustomizedProfile: api.CustomizedProfile{
......@@ -56,7 +56,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
ExternalURL: "",
},
StorageServiceID: api.DatabaseStorage,
LocalStoragePath: "",
LocalStoragePath: "assets/{timestamp}_{filename}",
}
systemSettingList, err := s.Store.FindSystemSettingList(ctx, &api.SystemSettingFind{})
......
INSERT
OR IGNORE INTO system_setting(name, value)
VALUES
(
'local-storage-path',
'"assets/{timestamp}_{filename}"'
);
\ No newline at end of file
INSERT INTO
system_setting (`name`, `value`, `description`)
VALUES
('allow-signup', 'true', ''),
('max-upload-size-mib', '32', '');
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment