diff --git a/admin/api/file.go b/admin/api/file.go index 28a4e4a4..e82b2cca 100644 --- a/admin/api/file.go +++ b/admin/api/file.go @@ -89,7 +89,7 @@ func importFile(uf uploadedFile, next func(string, string, []byte) (interface{}, return nil, errors.New("URI or path not filled") } - pathname := path.Join(fic.FilesDir, strings.ToLower(base32.StdEncoding.EncodeToString(hash[:])), path.Base(fromURI)) + pathname := path.Join(fic.FilesDir, strings.ToLower(base32.StdEncoding.WithPadding(0).EncodeToString(hash[:])), path.Base(fromURI)) // Remove the file if it exists // TODO: check if this is symlink => remove to avoid File not found error after, because the file is writen at the adresse pointed.