Fixed incorrect handling of the option to save images locally

This commit is contained in:
Marc Ole Bulling
2022-05-01 01:39:17 +02:00
parent 989076510c
commit 3ced4be96a

View File

@@ -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