fix: work around cloudflare r2 not conforming to s3 api standards
This commit is contained in:
		
							parent
							
								
									05cba6937f
								
							
						
					
					
						commit
						3442f7a518
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -248,8 +248,9 @@ func (db *DB) WriteFlag(ctx context.Context, flagID xid.ID, flag *bytes.Buffer) | |||
| 	} | ||||
| 	hash = hex.EncodeToString(hasher.Sum(nil)) | ||||
| 
 | ||||
| 	_, err = db.minio.PutObject(ctx, db.minioBucket, "/flags/"+hash+".webp", flag, -1, minio.PutObjectOptions{ | ||||
| 		ContentType: "image/webp", | ||||
| 	_, err = db.minio.PutObject(ctx, db.minioBucket, "flags/"+hash+".webp", flag, -1, minio.PutObjectOptions{ | ||||
| 		ContentType:    "image/webp", | ||||
| 		SendContentMd5: true, | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		return "", errors.Wrap(err, "uploading flag") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue