mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 08:06:37 +08:00
upload+accessKey
This commit is contained in:
@@ -59,6 +59,11 @@ func ServeFileByID(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if upload.StorageDriver == "local" || (upload.StorageDriver == "" && !storage.IsEnabled()) {
|
||||
c.File(upload.FilePath)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve file from S3 (via CDN if configured)
|
||||
obj, err := storage.GetObjectViaCache(c.Request.Context(), upload.FilePath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user