Skip to content
New issue

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

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

Already on GitHub? # to your account

Save image to S3 as a PNG file at /share/ endpoint #4

Open
anatoly-scherbakov opened this issue Apr 13, 2021 · 0 comments
Open

Save image to S3 as a PNG file at /share/ endpoint #4

anatoly-scherbakov opened this issue Apr 13, 2021 · 0 comments

Comments

@anatoly-scherbakov
Copy link
Owner

anatoly-scherbakov commented Apr 13, 2021

Based on issue #3, we now need to actually save the PNG file onto S3 bucket and ensure the file indeed exists there. The boto3 library will be necessary for that.

    from mypy_boto3_s3 import ServiceResource as S3

    s3: S3 = boto3.Resource('s3')
    bucket = s3.Bucket(settings.S3_BUCKET_NAME)
    bucket.Object('...').upload_file(...)
@anatoly-scherbakov anatoly-scherbakov changed the title Implement share API endpoint to provide public URL to an image Save image to S3 as a PNG file at /share/ endpoint Oct 31, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant