mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
fix error handling of s3.bucket param request
This commit is contained in:
parent
3dcb67fdd0
commit
941687692e
1 changed files with 3 additions and 4 deletions
|
@ -167,10 +167,9 @@ func (f *File) update(fileHeader *multipart.FileHeader) error {
|
|||
defer fileContent.Close()
|
||||
|
||||
bucket, err := configuration.GlobalConfig.String("s3.bucket")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if bucket == "" {
|
||||
if err != nil || bucket == "" {
|
||||
// s3 object storage not used, s3.bucket param is empty
|
||||
// save file to postgres DB
|
||||
f.FileData, err = ioutil.ReadAll(fileContent)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Reference in a new issue