diff --git a/client/pages/filespage/filezone.js b/client/pages/filespage/filezone.js index 8b42af19..30c7e918 100644 --- a/client/pages/filespage/filezone.js +++ b/client/pages/filespage/filezone.js @@ -42,7 +42,7 @@ export class MobileFileUpload extends React.Component{ this.props.emit("file.upload", this.props.path, e); } render(){ - if(/(Android|iPad|iPhone)/.test(navigator.userAgent) === false){ + if(!window.CONFIG["upload_button"] && /(Android|iPad|iPhone)/.test(navigator.userAgent) === false){ return null; } diff --git a/server/common/config.go b/server/common/config.go index 27a77421..ee22567f 100644 --- a/server/common/config.go +++ b/server/common/config.go @@ -73,6 +73,7 @@ func NewConfiguration() Configuration { FormElement{Name: "display_hidden", Type: "boolean", Default: false, Description: "Should files starting with a dot be visible by default?"}, FormElement{Name: "auto_connect", Type: "boolean", Default: false, Description: "User don't have to click on the login button if an admin is prefilling a unique backend"}, FormElement{Name: "remember_me", Type: "boolean", Default: true, Description: "Visiblity of the remember me button on the login screen"}, + FormElement{Name: "upload_button", Type: "boolean", Default: false, Description: "Display the upload button on any device"}, }, }, Form{ @@ -350,6 +351,7 @@ func (this Configuration) Export() interface{} { AutoConnect bool `json:"auto_connect"` Name string `json:"name"` RememberMe bool `json:"remember_me"` + UploadButton bool `json:"upload_button"` Connections interface{} `json:"connections"` EnableSearch bool `json:"enable_search"` EnableShare bool `json:"enable_share"` @@ -361,6 +363,7 @@ func (this Configuration) Export() interface{} { AutoConnect: this.Get("general.auto_connect").Bool(), Name: this.Get("general.name").String(), RememberMe: this.Get("general.remember_me").Bool(), + UploadButton: this.Get("general.upload_button").Bool(), Connections: this.Conn, EnableSearch: this.Get("features.search.enable").Bool(), EnableShare: this.Get("features.share.enable").Bool(),