Wow, this video is incredibly informative and eye-opening! I had no idea about these. Thank you so much for sharing and raising awareness on such an important topic. Keep up the great work!
Fantastic video! So to be clear on one point: You switched from using an ImageField to a FileField in an earlier video in this series. If I use an ImageField instead, would I get validation functionality out of the box, or do I still have to use "install magic"? I was hoping to use a FileField as you have shown, but I can switch my code up if I am unable to deploy this solution into an Azure production environment.
Thx a lot. Small note about unit testing: if you used a generated file for the test you can get a TypeError (expect string but not imagefield file as 10:25 expects a path to the file. I've solved it by changing param to a file for reading bytes.
One more great video, which is not a surprise, thank you! Can you please tell me, considering the options presented, is it enough to use only the 3rd option?
Thank you! I would recommend all 3. Even adding the "accept" attribute in HTML can prevent unwanted uploads that will be rejected on your server. Anything to prevent unnecessary load on the server (plus associated costs) is a win! By only using the 3rd option, users will find it easier to upload the wrong file types, which the server then processes and rejects - that load can be avoided with the other two methods.
Came back to post another comment, so i have implemented this but when trying to deploy to railway app, the build breaks on this python magic bin library. Any advice? Is there another way to do the same thing?
Wow, this video is incredibly informative and eye-opening! I had no idea about these. Thank you so much for sharing and raising awareness on such an important topic. Keep up the great work!
Thank you - I'm glad that the video was useful!
Never disappointed with you mate. I learnt somethong new thank you Master 🙌🏾
Thanks a lot man, as always!
This library is really magical 👍
Exactly what I needed. Thanks man, you're the best!
Thanks a lot for the support!
Thanks man ,very very good
Thanks a lot man!
Fantastic video! So to be clear on one point: You switched from using an ImageField to a FileField in an earlier video in this series. If I use an ImageField instead, would I get validation functionality out of the box, or do I still have to use "install magic"? I was hoping to use a FileField as you have shown, but I can switch my code up if I am unable to deploy this solution into an Azure production environment.
Thx a lot.
Small note about unit testing: if you used a generated file for the test you can get a TypeError (expect string but not imagefield file as 10:25 expects a path to the file. I've solved it by changing param to a file for reading bytes.
Hey man I spent a week thinking on how best to do content validation of a file. This was very helpful, once step closer to completing the goal.
Hey - thanks, glad to hear it was helpful. Thanks for watching! Good luck in your project.
thanks this was useful for me 👍👍
Thank you for watching!
excellent video, congratulations on the didactics
Thanks a lot!
Excellent! My go to channel for Django :)
Awesome - Thanks a lot for watching!
One more great video, which is not a surprise, thank you! Can you please tell me, considering the options presented, is it enough to use only the 3rd option?
Thank you!
I would recommend all 3. Even adding the "accept" attribute in HTML can prevent unwanted uploads that will be rejected on your server. Anything to prevent unnecessary load on the server (plus associated costs) is a win!
By only using the 3rd option, users will find it easier to upload the wrong file types, which the server then processes and rejects - that load can be avoided with the other two methods.
@@bugbytes3923 thank you
thank
You're welcome!
Thank you for your video.
im curious why just use 1024 bytes in from_buffer?
Is this based on something that data or books?
Thank you. No real reason to choose that number, just for demo.
Came back to post another comment, so i have implemented this but when trying to deploy to railway app, the build breaks on this python magic bin library. Any advice?
Is there another way to do the same thing?
Ah - sorry to hear that. Do you have an error log for this issue?
I've not used Railway, but might be able to help.
Wowww