0

I have a view in Django like this :

f=request.FILES['image']
filename=str(f).split('.')[0]
cloudFilename = 'blog/' + filename
s3 = boto3.resource('s3', aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY)
bucket = s3.Bucket('django-pnp-talk')
bucket.put_object(Key=cloudFilename, Body=f)

how can I get the URL from the recently object that I put into the bucket?

0 Answers0