mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
web client: use fetch to upload files
also add REST API to upload a single file as POST body
This commit is contained in:
@@ -348,6 +348,15 @@ func (u *User) GetPermissionsForPath(p string) []string {
|
||||
return permissions
|
||||
}
|
||||
|
||||
// HasBufferedSFTP returns true if the user has a SFTP filesystem with buffering enabled
|
||||
func (u *User) HasBufferedSFTP(name string) bool {
|
||||
fs := u.GetFsConfigForPath(name)
|
||||
if fs.Provider == sdk.SFTPFilesystemProvider {
|
||||
return fs.SFTPConfig.BufferSize > 0
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (u *User) getForbiddenSFTPSelfUsers(username string) ([]string, error) {
|
||||
sftpUser, err := UserExists(username)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user