fix(media): 资源交付 - 按内容识别上传类型并统一重试与附件交付 (#678)
Co-authored-by: ddcat666 <26564566+ddcat666@users.noreply.github.com>
This commit is contained in:
1 parent
3750fada7a
commit
398f8e36f5
10 files changed
+322
-39
No files matched your search
@@ -140,6 +140,10 @@ func ResolveAccess(resource *model.Resource, setting storage.Settings, options A
|
||||
}
|
||||
if resource.Provider == "local" {
|
||||
access.Delivery = DeliveryLocal
|
||||
} else if !InlineMediaType(resource.MimeType) {
|
||||
// A redirect cannot enforce our attachment and sandbox response headers.
|
||||
access.Delivery = DeliveryProxy
|
||||
access.FallbackReason = "attachment_required"
|
||||
} else if options.Purpose == PurposeDownload {
|
||||
// Cross-origin `a[download]` is only advisory. A real browser download must
|
||||
// therefore be enforced by the object store response itself. Downloads use
|
||||
|
||||
Reference in new issue
Block a user