Change local media attachments to perform heavy processing asynchronously (#13210)

Fix #9106
This commit is contained in:
Eugen Rochko 2020-03-08 23:56:18 +01:00 committed by GitHub
parent 764b89939f
commit 9660aa4543
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 165 additions and 17 deletions

View file

@ -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'

View file

@ -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

View file

@ -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