Commit 2d3adbcc authored by Sonja Happ's avatar Sonja Happ
Browse files

Add some (temporary) debug output to test S3

parent 79ca53ce
......@@ -107,6 +107,7 @@ func (f *File) Register(fileHeader *multipart.FileHeader, scenarioID uint) error
if err != nil {
return fmt.Errorf("failed to upload to S3 bucket: %s", err)
}
log.Println("Saved new file in S3 object storage")
}
// Add image dimensions in case the file is an image
......@@ -165,6 +166,8 @@ func (f *File) update(fileHeader *multipart.FileHeader) error {
if err != nil {
return fmt.Errorf("failed to upload to S3 bucket: %s", err)
}
log.Println("Updated file in S3 object storage")
}
f.Type = fileHeader.Header.Get("Content-Type")
......@@ -225,6 +228,7 @@ func (f *File) Delete() error {
if err != nil {
return err
}
log.Println("Deleted file in S3 object storage")
}
err = db.Model(&so).Association("Files").Delete(f).Error
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment