Package to upload object to aws s3 and return s3 file url
Project description
File upload to AWS S3
This packge can be used to upload file in s3 and get file generated url.
Steps to use package
- Install package with
pip install fileUploadS3_x21182787
- import package in python and use it
>> from fileUploadS3_x21182787 import uploadGenrateUrl
>> uploadGenrateUrl.s3UploadGenURL("b64EncodedData","filename.ext","bucket_name")
Funcation Description
s3UploadGenURL(b64EncodedData, s3_file, bucket_name)
will take 3 parameters
- b64EncodedData - Data should be in
base64 encoded
formate. - s3_file - File name in which data to be stored eg. abc.jpg, file.doc etc...
- bucket_name - S3 bucket name file to be store.
Example
import json
from fileUploadS3_x21182787 import uploadGenerateUrl
response = uploadGenrateUrl.s3UploadGenURL("b64EncodedData","filename.ext","bucket_name")
print(json.loads(response)) # {"img_url": "s3_file_url"}
print(json.loads(response)[img_url]) # will print s3_file_url
Note:
Before using the response convert it to json `json.loads(response)`. because package returing stringified json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for fileuploads3_x21182787-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e508ed2a34564802b051ef5dd652fbba142d0761faad9a7cd8f3973c7482cb13 |
|
MD5 | 19eb954decf69ba0e16d7c57ebd3203d |
|
BLAKE2b-256 | e0220af3d38a068ff73e6a49938559e92db0efca568acf9836e6317ff1ca2a24 |
Close
Hashes for fileuploads3_x21182787-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30f87cdd0ee2c2ba4615ebe3013967852d75569350c3337c69080066a105785a |
|
MD5 | 16664c1f3408a24872b43c46f68d4da5 |
|
BLAKE2b-256 | 13dbf4970191af0759e3827acab4fc8b1735290c4fa5335db000adb46331bb9e |