Browse Source

Fix BunnyCDN media upload

master
Jan-Lukas Else 8 months ago
parent
commit
0292344035
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mediastorage.go

+ 1
- 1
mediastorage.go View File

@ -28,7 +28,7 @@ var bunnyCdnStorageUrl = "https://storage.bunnycdn.com"
func (b *BunnyCdnStorage) Upload(fileName string, file multipart.File) (location string, err error) {
client := http.DefaultClient
req, _ := http.NewRequest(http.MethodPut, bunnyCdnStorageUrl+"/"+url.PathEscape(b.storageZoneName)+"/"+url.PathEscape("/"+fileName), file)
req, _ := http.NewRequest(http.MethodPut, bunnyCdnStorageUrl+"/"+url.PathEscape(b.storageZoneName)+"/"+url.PathEscape(fileName), file)
req.Header.Add("AccessKey", b.key)
resp, err := client.Do(req)
if err != nil || resp.StatusCode != 201 {


Loading…
Cancel
Save