about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-03-08 23:56:18 +0100
committerGitHub <noreply@github.com>2020-03-08 23:56:18 +0100
commit9660aa4543deff41c60d131e081137f84e771499 (patch)
tree8809339341484045802fa46526c798ad0e68fb2c /config
parent764b89939fe2fcb8c4389738af8685949104c144 (diff)
Change local media attachments to perform heavy processing asynchronously (#13210)
Fix #9106
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/locales/en.yml1
-rw-r--r--config/routes.rb3
3 files changed, 4 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb
index 1baa166ce..cd599eefc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -7,6 +7,7 @@ require 'rails/all'
 Bundler.require(*Rails.groups)
 
 require_relative '../app/lib/exceptions'
+require_relative '../lib/paperclip/attachment_extensions'
 require_relative '../lib/paperclip/lazy_thumbnail'
 require_relative '../lib/paperclip/gif_transcoder'
 require_relative '../lib/paperclip/video_transcoder'
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 8440b471c..a031f9e9d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -853,6 +853,7 @@ en:
   media_attachments:
     validations:
       images_and_video: Cannot attach a video to a status that already contains images
+      not_ready: Cannot attach files that have not finished processing. Try again in a moment!
       too_many: Cannot attach more than 4 files
   migrations:
     acct: Moved to
diff --git a/config/routes.rb b/config/routes.rb
index 2de31e2db..89d446d10 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -343,7 +343,7 @@ Rails.application.routes.draw do
         end
       end
 
-      resources :media,        only: [:create, :update]
+      resources :media,        only: [:create, :update, :show]
       resources :blocks,       only: [:index]
       resources :mutes,        only: [:index]
       resources :favourites,   only: [:index]
@@ -455,6 +455,7 @@ Rails.application.routes.draw do
     end
 
     namespace :v2 do
+      resources :media, only: [:create]
       get '/search', to: 'search#index', as: :search
     end