-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add gif support #3
Conversation
prism/app.py
Outdated
raise NotFound() | ||
if extension == '.gif' and request.args.get('out', 'gif') == 'gif': | ||
customer = self.get_customer(request) | ||
return redirect(core.get_s3_url(customer.read_bucket_name, customer.read_bucket_region, path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be up here? Can it be below, just above if args['command'] == 'info':
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was the first place I put it, but here args = parse_args(path, request)
function does some validations like width or height is required
. For basic .gif
case we don't need that.
If the duplicate declaration of get_customer()
method is the concern, we may call it before the if extension == '.gif' and request.args.get('out', 'gif') == 'gif':
line. But, here I just don't wanted to break the existing flow of calling the get_customer
method if all validations are done successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validations like width or height is required. For basic .gif case we don't need that.
We don't actually want to change this behavior. At least not for the gif case specifically. We just want gifs to work with the same parameters as passed for any other image. Right now a width or height is required so the same should be true when serving gifs, even if they do nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, right, I will move it as you suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you.
No description provided.