feat: temp upload
This commit is contained in:
15
utils/bos.go
Normal file
15
utils/bos.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import "nCovTrack-Backend/global"
|
||||
|
||||
func UploadFile() string {
|
||||
etag, err := global.BosClient.PutObjectFromFile("ncovtrack", "test.jpg", "/home/fallen-angle/Pictures/Anime/pic-w-000003.jpg", nil)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return etag
|
||||
}
|
||||
|
||||
func DownloadLink() string {
|
||||
return global.BosClient.BasicGeneratePresignedUrl("ncovtrack", "test.jpg", 1800)
|
||||
}
|
||||
Reference in New Issue
Block a user