You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like only URLs without query params are supported. The gem seems to toss away the query part which may result in 403 errors for Amazon S3 resources where the auth token is part of the query param. On top of that, the gem just throws a "the file does not exist" error which totally obscures the 403 code.
As a workaround, I'm doing this:
def ffmpeg_video_from_remote(remote_file_url)
open(File.join('public', file.file.filename), 'wb') do |file|
file << open(remote_file_url).read
FFMPEG::Movie.new(Rails.root.join(file.path).to_s)
end
end
Edit: I was wrong. It looks like the query params do get used but what is happening is my pre-signed URL to Amazon S3 is only meant to be used with GET but the library does a HEAD request.
The text was updated successfully, but these errors were encountered:
mhluska
changed the title
Preserve Query Params
Internal HEAD request not working with Pre-signed URLs
Dec 4, 2017
It looks like only URLs without query params are supported. The gem seems to toss away the query part which may result in 403 errors for Amazon S3 resources where the auth token is part of the query param. On top of that, the gem just throws a "the file does not exist" error which totally obscures the 403 code.
As a workaround, I'm doing this:
Edit: I was wrong. It looks like the query params do get used but what is happening is my pre-signed URL to Amazon S3 is only meant to be used with GET but the library does a HEAD request.
The text was updated successfully, but these errors were encountered: