Any advice on how to get it working on heroku? Getting a 500 error on the admin page only when I submit a file so I think that’s the issue. The only thing I changed was environment variables for the keys. It does work locally though. Any help would be appreciated
Thank you very much friend, what do you recommend to keep my users' record icons safe? I noticed that you used the bucket public but I would like you to be more sure of my side
Hi, thank you for this tutorial. Just wantes to ask, how can I use multiple buckets for different data needs? For example, pdfs to go in one bucket for one purpose and images to go in a different one.
Hello sir, thanks for the video already saved it for the future since I don't have a credit card at the moment, I was wondering if I added media_root in settings would there be any change? like a folder (named after the media_root) inside S3 bucket?
H13 - Connection closed without response This error is thrown when a process in your web dyno accepts a connection but then closes the socket without writing anything to it. While Uploading Some files it Causing this Error ??
Both django-storages and boto3 installed, but while using DEFAULT_FILE_STORAGE= 'storages.backends.s3boto3.S3Boto3Storage' I get message "Endpoint request timed out", when I try to make a custom storage, I get the above import-error.
Awesome video. But how do we ensure each picture that goes into the s3 bucket has a different name ? AM thinking of importing random, os and string for this. Please, recommend me shorter method if possible.
Thanks a lot, Anthony. I tried to go a little bit further and resize uploaded images with lambda function on amazon side. To do that I had to keep two buckets: one as a source bucket, second - for keeping re-sized images. Django can find the url that points to a resized image and it's almost OK. But I still struggling with 2 problems: 1. When user uploads an image creating a new post we re-direct him often to a detail view. But image is not rendered at this point and in devtools there is an 404 (page not found)error for the image link. If detailed page is refreshed ( and so the second request for the same img is sent) the image is available as it should be. If user after upload gets redirected to a list view and then to the detail view, image is rendered without any problem. Seems it can't be an issue with perms, otherwise the img wouldn't be available at all. 2. Second problem comes when user wants to delete an image. If it happens without implementing second bucket, django storage helps not only to delete a link(url) but also deletes the img file self. If I use flow with re-sizing, django storage seems not to know where the image to delete is. Although link to the image gets removed, I'm afraid that I'll get too many orphan images at some point. Feedback is more then welcome.
For the first issue, the only thing I can think of is your page loads your detail view faster than the image gets resized and moved on S3. If that's the case, then I'd have some async JavaScript process waiting to load the image on the detail page if it's important for the user to see right away. For the second, I guess it depends on how you got the image resizing to work. If you extended the storage class directly, then you'll to update the delete method for S3Boto3Storage. If you did something like just crafting the URLs directly using the bucket for the resized images, then updating the delete method should also work.
@@prettyprinted i guess what im asking is, is this method of uploading files as scalable as uploading files directly to s3 using presigned urls from the client?
After watching many other videos on this topic, finally, your video helped me at last to connect S3 bucket successfully. Thanks a lot. RESPECT 🌹
I've been at this for a little bit now and you gave the most straightforward but also most complete tutorial.
I could kiss you right now
Thanks Man.. After searching lot of tutorial on internet at last I find your video and it worked
I've been facing some issues with my django app and here I found the answer, thanksss! 🤩
Greetings Antony, it is always very cool to see your tutorials.
Thank you!
Glad you like them!
Hey bro, you are the lifesaver for me. I tried so hard to get this thing right but I couldn't. Thanks a lot.
Thanks for this! The most concise tutorial out there. Worked for me immediately, unlike some others out there. Thank you!
Without any water. Thank you very much.
I was stuck on this for a whole day. Thanks my friend. A like and a sub is not enough.
TE AMO WACHOOOOOOO, cortita y al pie, saludos desde Argentina jaja, aguante Santa Fe
Thanks for the video. Those are some really cute cats!
They are! I wish they were mine, but I just found some pictures online.
Worked great. Instantly subscribed after this! Wonderful job!
You are a life saver bro .
simple and precise
Bro you are awesome, thank you so much, explain very well!!!
Such an excellent video, sad to see so few views and likes. Thank you man!
Any advice on how to get it working on heroku? Getting a 500 error on the admin page only when I submit a file so I think that’s the issue. The only thing I changed was environment variables for the keys. It does work locally though. Any help would be appreciated
Same, have you been able to solve this issue?
Thanks for this video. It helped me to solve issue.
After i iupload to s3 using react my drf is not immediately updating. I need to reload twice before the image updated. how can i solve this? Thank you
how to do this with multiple file upload from admin panel by selecting all files in one go
great video mate. found exactly what I came for.
Thanks for the video! Could you please make a similar video but using supabase bucket?
I am getting an error can't see the admin dashboard after login it shows error like can't force an update in save() with no primary key
Simple and precise....thanks for this
How can I assign a policy that this certain user only has access to specific Buckets?
Thanks man, very simple and clean !
thanks. saved hours of stress
what if i want my admin user to be able to view pictures any user has submitted like pictures for verification of identification documents?
Hi, i have one doubt
You didn't declared anything regards S3 in Cat model, but how it was directly stored into S3 bucket?
Thanks a lot. This was helpful.
You helped me solve this issue! Thank you!
Thank you! Very helpful
How do I do it if I want to display let's say this cat3 image in an application
How would it be called in the template?
Awesome as always 👍😀
Thanks for watching!
thanks for the awesome tutorial. How to access to the files if the amazon server not public and I want to use files on my app?
Excellent video Anthony 👍
Thanks for watching!
Thank you very much friend, what do you recommend to keep my users' record icons safe? I noticed that you used the bucket public but I would like you to be more sure of my side
That was great! Thanks so much.
Hi, thank you for this tutorial. Just wantes to ask, how can I use multiple buckets for different data needs? For example, pdfs to go in one bucket for one purpose and images to go in a different one.
you are amazing man
very good contribution thank you very much for sharing your knowledge.
i have a question how can i delete a file from s3 aws with django?
Thank you so much! It works!!
Congrats for video, I use AWS normaly in my application, but to upload files from forms it is not working correctly... file is not going to bucket...
Hello sir, thanks for the video already saved it for the future since I don't have a credit card at the moment, I was wondering if I added media_root in settings would there be any change? like a folder (named after the media_root) inside S3 bucket?
Thank you thank you thank you
I love it I love it I love it
💖💖💖🥰🥰🥰
I'm glad you like it
Hi,there After the free tier limit, Amazon's gonna auto charge me can't i pause it or pay manually?
great it worked, thank you so much
You saved me man!
H13 - Connection closed without response
This error is thrown when a process in your web dyno accepts a connection but then closes the socket without writing anything to it.
While Uploading Some files it Causing this Error ??
HOla. La imagen se guarda por duplicado, localmente y remotamente? o solo en AWS storage. Excelente video, gracias
Does it also in work in digital ocean storage?
well explained,,thanks alot😍
Please help: Unable to import 'storages.backends.s3boto3' pylint(import-error)
Both django-storages and boto3 installed, but while using
DEFAULT_FILE_STORAGE= 'storages.backends.s3boto3.S3Boto3Storage'
I get message "Endpoint request timed out",
when I try to make a custom storage, I get the above import-error.
Does anyone know why I get a message telling that I do not have permission the edit bucket policy and how to fix that?
Awesome video. But how do we ensure each picture that goes into the s3 bucket has a different name ? AM thinking of importing random, os and string for this. Please, recommend me shorter method if possible.
For that, you can set AWS_S3_FILE_OVERWRITE to False in your settings file
how to write an endpoint to store the file in s3 and return the url to frontned?
Thanks a lot, Anthony.
I tried to go a little bit further and resize uploaded images with lambda function on amazon side.
To do that I had to keep two buckets: one as a source bucket, second - for keeping re-sized images.
Django can find the url that points to a resized image and it's almost OK.
But I still struggling with 2 problems:
1. When user uploads an image creating a new post we re-direct him often to a detail view.
But image is not rendered at this point and in devtools there is an 404 (page not found)error for the image link.
If detailed page is refreshed ( and so the second request for the same img is sent) the image is available as it should be.
If user after upload gets redirected to a list view and then to the detail view, image is rendered without any problem.
Seems it can't be an issue with perms, otherwise the img wouldn't be available at all.
2. Second problem comes when user wants to delete an image.
If it happens without implementing second bucket, django storage helps not only to delete a link(url) but also deletes the img file self.
If I use flow with re-sizing, django storage seems not to know where the image to delete is. Although link to the image gets removed, I'm afraid that I'll get too many orphan images at some point.
Feedback is more then welcome.
For the first issue, the only thing I can think of is your page loads your detail view faster than the image gets resized and moved on S3. If that's the case, then I'd have some async JavaScript process waiting to load the image on the detail page if it's important for the user to see right away.
For the second, I guess it depends on how you got the image resizing to work. If you extended the storage class directly, then you'll to update the delete method for S3Boto3Storage. If you did something like just crafting the URLs directly using the bucket for the resized images, then updating the delete method should also work.
@@prettyprinted Thank you very much. Very helpful.
Awesome Video
Thanks for the video. But How if using Google Cloud Storage in Django?
Please make tutorial video about that.
thanks for saving me
Thanks a lot!
Nice video. Can you make a video about Flask 2.0 and the new async views they added. Thanks
I'll look into it.
Can you make a video on azure blob storage?
Thank you
Thanks a lot :)
Keep going bro
So does the file still hit the django server or does it get handed off to s3 via the client?
The Django server will move the file to S3, but it never gets saved on the same server as your Django app.
@@prettyprinted i guess what im asking is, is this method of uploading files as scalable as uploading files directly to s3 using presigned urls from the client?
Nice..
Thanks
Thank you!!!
Thanks a lot!
thank you