mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #2772 from mkayman/s3_store_content_disposition
Don't set content-disposition header for images
This commit is contained in:
commit
d4d6ff8e45
@ -139,7 +139,11 @@ module FileStore
|
|||||||
public: true,
|
public: true,
|
||||||
body: file
|
body: file
|
||||||
}
|
}
|
||||||
args[:content_disposition] = "attachment; filename=\"#{filename}\"" if filename
|
|
||||||
|
if filename && !FileHelper.is_image?(filename)
|
||||||
|
args[:content_disposition] = "attachment; filename=\"#{filename}\""
|
||||||
|
end
|
||||||
|
|
||||||
args[:content_type] = content_type if content_type
|
args[:content_type] = content_type if content_type
|
||||||
|
|
||||||
get_or_create_directory(s3_bucket).files.create(args)
|
get_or_create_directory(s3_bucket).files.create(args)
|
||||||
|
Loading…
Reference in New Issue
Block a user