Merge pull request #5760 from tchak/fix-graphql-upload
[GraphQL] fix attachment upload
This commit is contained in:
commit
708cc20b95
2 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ module Mutations
|
|||
begin
|
||||
blob = ActiveStorage::Blob.find_signed(blob_id)
|
||||
blob.identify
|
||||
nil
|
||||
rescue ActiveStorage::FileNotFoundError
|
||||
return { errors: ['Le fichier n’a pas été correctement téléversé sur le serveur de stockage'] }
|
||||
rescue ActiveSupport::MessageVerifier::InvalidSignature
|
||||
|
|
|
@ -37,7 +37,7 @@ describe API::V2::GraphqlController do
|
|||
}
|
||||
end
|
||||
let(:blob) do
|
||||
blob = ActiveStorage::Blob.create_before_direct_upload!(blob_info)
|
||||
blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_info)
|
||||
blob.upload(file)
|
||||
blob
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue