-
Notifications
You must be signed in to change notification settings - Fork 297
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
Added Facility Cover image API endpoints #791
Added Facility Cover image API endpoints #791
Conversation
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.
Changes requested in Initial Review.
Key=f"cover_images/{image.name}", | ||
Body=image.file, | ||
) | ||
facility.cover_image_url = f"{upload_response['ResponseMetadata']['HTTPHeaders']['location']}cover_images/{image.name}" |
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.
Ideally we want to store the key and store the CDN URL separately, we can ignore this for this instance i think.
|
||
|
||
class FacilityImageUploadSerializer(serializers.ModelSerializer): | ||
cover_image = serializers.ImageField(required=True, write_only=True) |
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.
why is this write_only, there is not retrieve API associated to this endpoint right?
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.
There is no retrieve API with upload serializer, that's why I'm making it write-only, cover_image_url will be there on facility retrieve API endpoint, am I going in right direction?
Changes look good to me otherwise, @mathew-alex add env vars for the extra setting confs required in this PR. |
added env vars in staging. |
@mathew-alex can we merge this PR ? |
@mathew-alex Add the ENV requirements in the Deploy Docs as well. @Marmik2003 Can you fix the conflicts @vigneshhari Let's merge this! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@Marmik2003 can you check this pr again, it's breaking |
fixes #737