mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 08:33:41 +01:00
Fix naming issue (#13551)
This commit is contained in:
parent
c3ca3801f2
commit
acc367fd14
1 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ Paperclip.interpolates :filename do |attachment, style|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Paperclip.interpolates :path_prefix do |attachment, style|
|
Paperclip.interpolates :prefix_path do |attachment, style|
|
||||||
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
||||||
'cache' + File::SEPARATOR
|
'cache' + File::SEPARATOR
|
||||||
else
|
else
|
||||||
|
@ -18,7 +18,7 @@ Paperclip.interpolates :path_prefix do |attachment, style|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Paperclip.interpolates :url_prefix do |attachment, style|
|
Paperclip.interpolates :prefix_url do |attachment, style|
|
||||||
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
if attachment.storage_schema_version >= 1 && attachment.instance.respond_to?(:local?) && !attachment.instance.local?
|
||||||
'cache/'
|
'cache/'
|
||||||
else
|
else
|
||||||
|
@ -28,7 +28,7 @@ end
|
||||||
|
|
||||||
Paperclip::Attachment.default_options.merge!(
|
Paperclip::Attachment.default_options.merge!(
|
||||||
use_timestamp: false,
|
use_timestamp: false,
|
||||||
path: ':url_prefix:class/:attachment/:id_partition/:style/:filename',
|
path: ':prefix_url:class/:attachment/:id_partition/:style/:filename',
|
||||||
storage: :fog
|
storage: :fog
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ else
|
||||||
Paperclip::Attachment.default_options.merge!(
|
Paperclip::Attachment.default_options.merge!(
|
||||||
storage: :filesystem,
|
storage: :filesystem,
|
||||||
use_timestamp: true,
|
use_timestamp: true,
|
||||||
path: File.join(ENV.fetch('PAPERCLIP_ROOT_PATH', File.join(':rails_root', 'public', 'system')), ':path_prefix:class', ':attachment', ':id_partition', ':style', ':filename'),
|
path: File.join(ENV.fetch('PAPERCLIP_ROOT_PATH', File.join(':rails_root', 'public', 'system')), ':prefix_path:class', ':attachment', ':id_partition', ':style', ':filename'),
|
||||||
url: ENV.fetch('PAPERCLIP_ROOT_URL', '/system') + '/:url_prefix:class/:attachment/:id_partition/:style/:filename',
|
url: ENV.fetch('PAPERCLIP_ROOT_URL', '/system') + '/:prefix_url:class/:attachment/:id_partition/:style/:filename',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue