diff --git a/client/pages/filespage.helper.js b/client/pages/filespage.helper.js
index 198e37f9..0a3c5978 100644
--- a/client/pages/filespage.helper.js
+++ b/client/pages/filespage.helper.js
@@ -103,7 +103,7 @@ export const onDelete = function(path, type){
};
export const onUpload = function(path, e){
- const MAX_POOL_SIZE = 50;
+ const MAX_POOL_SIZE = 15;
let PRIOR_STATUS = {};
extract_upload_directory_the_way_that_works_but_non_official(e.dataTransfer.items || [], [])
.then((files) => {
diff --git a/client/pages/filespage/submenu.js b/client/pages/filespage/submenu.js
index 26ef3bac..22a5fd86 100644
--- a/client/pages/filespage/submenu.js
+++ b/client/pages/filespage/submenu.js
@@ -130,19 +130,21 @@ export class Submenu extends React.Component {
-
+
+
diff --git a/client/pages/filespage/thing-existing.js b/client/pages/filespage/thing-existing.js
index 8f307a16..b077dc51 100644
--- a/client/pages/filespage/thing-existing.js
+++ b/client/pages/filespage/thing-existing.js
@@ -214,12 +214,13 @@ export class ExistingThing extends React.Component {
return connectDragSource(connectDropNativeFile(connectDropFile(
diff --git a/server/common/config.go b/server/common/config.go
index 64255c30..0c1feeea 100644
--- a/server/common/config.go
+++ b/server/common/config.go
@@ -34,8 +34,10 @@ func init() {
// OAuth credentials
c.Get("oauth").Default("")
- // Share
- c.Get("share.enable").Default(true)
+ // Features
+ c.Get("feature.share.enable").Default(true)
+ c.Get("feature.search.enable").Default(true)
+
// Log
c.Get("log.telemetry").Default(true)
@@ -183,6 +185,8 @@ func (this Config) Export() (string, error) {
Name string `json:"name"`
RememberMe bool `json:"remember_me"`
Connections interface{} `json:"connections"`
+ EnableSearch bool `json:"enable_search"`
+ EnableShare bool `json:"enable_share"`
MimeTypes map[string]string `json:"mime"`
}{
Editor: this.Get("general.editor").String(),
@@ -192,6 +196,8 @@ func (this Config) Export() (string, error) {
Name: this.Get("general.name").String(),
RememberMe: this.Get("general.remember_me").Bool(),
Connections: this.Get("connections").Interface(),
+ EnableSearch: this.Get("feature.search.enable").Bool(),
+ EnableShare: this.Get("geature.share.enable").Bool(),
MimeTypes: AllMimeTypes(),
}
j, err := json.Marshal(publicConf)
diff --git a/server/main.go b/server/main.go
index 4cb59033..1298db04 100644
--- a/server/main.go
+++ b/server/main.go
@@ -24,7 +24,7 @@ func Init(a *App) {
session := r.PathPrefix("/api/session").Subrouter()
session.HandleFunc("", APIHandler(SessionGet, *a)).Methods("GET")
session.HandleFunc("", APIHandler(SessionAuthenticate, *a)).Methods("POST")
- session.HandleFunc("", APIHandler(SessionLogout, *a)).Methods("DELETE")
+ session.HandleFunc("", CtxInjector(SessionLogout, *a)).Methods("DELETE")
session.Handle("/auth/{service}", APIHandler(SessionOAuthBackend, *a)).Methods("GET")
files := r.PathPrefix("/api/files").Subrouter()
@@ -46,7 +46,7 @@ func Init(a *App) {
r.PathPrefix("/s/{share}").Handler(CtxInjector(WebdavHandler, *a))
// APP
- r.HandleFunc("/api/config", APIHandler(ConfigHandler, *a)).Methods("GET")
+ r.HandleFunc("/api/config", CtxInjector(ConfigHandler, *a)).Methods("GET")
r.PathPrefix("/assets").Handler(StaticHandler(FILE_ASSETS, *a)).Methods("GET")
r.PathPrefix("/").Handler(DefaultHandler(FILE_INDEX, *a)).Methods("GET")