File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 66 "authorUrl" : " https://atbug.com" ,
77 "isDesktopOnly" : true ,
88 "minAppVersion" : " 0.11.0" ,
9- "version" : " 1.0.0 "
9+ "version" : " 1.0.1 "
1010}
Original file line number Diff line number Diff line change 11{
22 "name" : " obsidian-image-upload-toolkit" ,
3- "version" : " 1.0.0 " ,
3+ "version" : " 1.0.1 " ,
44 "description" : " " ,
55 "author" : " addozhang" ,
66 "main" : " main.js" ,
Original file line number Diff line number Diff line change @@ -31,13 +31,15 @@ export default class R2Uploader implements ImageUploader {
3131 Bucket : this . bucket ,
3232 Key : path ,
3333 Body : uint8Array ,
34+ ContentType : `image/${ image . name . split ( '.' ) . pop ( ) } ` ,
3435 } ;
3536 return new Promise ( ( resolve , reject ) => {
3637 this . r2 . upload ( params , ( err , data ) => {
3738 if ( err ) {
3839 reject ( err ) ;
3940 } else {
40- resolve ( UploaderUtils . customizeDomainName ( data . Key , this . customDomainName ) ) ;
41+ const dst = data . Location . split ( `/${ this . bucket } /` ) . pop ( ) ;
42+ resolve ( UploaderUtils . customizeDomainName ( dst , this . customDomainName ) ) ;
4143 }
4244 } ) ;
4345 } ) ;
You can’t perform that action at this time.
0 commit comments