mirror of
https://github.com/Forceu/Gokapi.git
synced 2026-01-28 03:58:32 -06:00
Fixed incorrect handling of the option to save images locally
This commit is contained in:
@@ -63,8 +63,7 @@ func NewFile(fileContent io.Reader, fileHeader *multipart.FileHeader, uploadRequ
|
||||
addHotlink(&file)
|
||||
filename := configuration.Get().DataDir + "/" + file.SHA256
|
||||
dataDir := configuration.Get().DataDir
|
||||
if aws.IsAvailable() {
|
||||
aws.AddBucketName(&file)
|
||||
if file.AwsBucket != "" {
|
||||
_, err := aws.Upload(reader, file)
|
||||
if err != nil {
|
||||
return models.File{}, err
|
||||
|
||||
Reference in New Issue
Block a user