I have some problems with the image field, I store them on AWS through DigitalOcean.
Fun Fact: When I upload an image on to the admin panel, it works fine, and when I’m trying to do the same in a template , image updates but does not get stored on AWS. When I try to click this image in the admin panel instead of an image I get this.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error> <Code>NoSuchKey</Code> <BucketName>financal-space</BucketName> <RequestId>tx000000000000004683770-005ec5341d-ab90b1-ams3b</RequestId> <HostId>ab90b1-ams3b-ams3-zg02</HostId> </Error>
Here is my image post request
if 'imagechange' in request.POST and request.FILES['image']: user = request.user.id image = request.FILES['image'] fs = FileSystemStorage() image_fs = fs.save(image.name, image) image_new = CustomUser.objects.filter(user=user).update(image=image_fs)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!