Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for custom HEAD request URLs #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leviwilson
Copy link

When using an S3 presigned URL, you cannot obtain a URL for a private object that allows
for both a GET and a HEAD request on it.

Because of this, you need to:

  head_url = object.presigned_url(:head)
  get_url = object.presigned_url(:get)

...independently of one another.

This means that you cannot get media information with this gem.

To allow for this, I've added an option to pass in a custom head_url: argument to allow
for this separation.

In this manner, you can now do this:

  movie = FFMPEG::Movie.new(object.presigned_url(:get), head_url: object.presigned_url(:head))

And obtain your information successfully.

When using an S3 presigned URL, you cannot obtain a URL for a private object that allows
for both a GET and a HEAD request on it.

Because of this, you need to:

  head_url = object.presigned_url(:head)
  get_url = object.presigned_url(:get)

...independently of each other.

This means that you cannot get media information with this gem.

To _allow_ for this, I've added an option to pass in a custom head_url: argument to allow
for this separation.

In this manner, you can now do this:

  movie = FFMPEG::Movie.new(object.presigned_url(:get), head_url: object.presigned_url(:head))

And obtain your information successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant