mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-01 17:34:59 +08:00
Add path method to custom ActiveStorage S3 service [SCI-3765]
This commit is contained in:
parent
f94b8165dc
commit
2298ba4e4e
1 changed files with 4 additions and 0 deletions
|
@ -123,6 +123,10 @@ module ActiveStorage
|
|||
{ 'Content-Type' => content_type, 'Content-MD5' => checksum }
|
||||
end
|
||||
|
||||
def path_for(key)
|
||||
subfolder.present? ? File.join(subfolder, key) : key
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
MAXIMUM_UPLOAD_PARTS_COUNT = 10000
|
||||
|
|
Loading…
Add table
Reference in a new issue