You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I set the content type of the uploading file? (for example, image/jpeg)
I tried to set the .ContentType member of returned value from obj.Attrs()
but it seems that Attrs() is only usable for download of existing file.
I found that there is UploadFile method but I could not find how to use.
The text was updated successfully, but these errors were encountered:
import"github.com/kurin/blazer/b2"// ... all your setup codew:=bucket.Object(dst).NewWriter(ctx, b2.WithAttrsOption(&b2.Attrs{ContentType: "image/jpeg"}))
w.Write(myFileBlob)
How can I set the content type of the uploading file? (for example, image/jpeg)
I tried to set the .ContentType member of returned value from obj.Attrs()
but it seems that Attrs() is only usable for download of existing file.
I found that there is UploadFile method but I could not find how to use.
The text was updated successfully, but these errors were encountered: