Importing images on heroku

Submitted 3 years, 7 months ago
Ticket #114
Views 226
Language/Framework Python
Priority Urgent
Status Closed

Hi again
Today i deployed my django app on heroku but now i have 1 issue

When i create a profile i can edit it after... while i edit i can add a new image from my computer or cellphone
Its uploading it well and thats okay

But when I try to log into my account in other device i dont have that image in my files sooo my question is how can i make a file uploaded appears in every device

Submitted on Sep 01, 20
add a comment

1 Answer

Verified

What is the storage you are using your project. I mean where MEDIA folder resides. Is it in AWS S3 or something else.

Check this Heroku storage article

Submitted 3 years, 7 months ago

i was using local saving when i was on localhost... saving the images in a file located on media/profilepics

soo now i dont know wow can i do is there any easy way to solve this?

- BrunoSeixas 3 years, 7 months ago

Heroku doesnt support MEDIA storage. So you need to come up with different storage like AWS S3 or something like this. Or check about WhiteNoise

- scott 3 years, 7 months ago

to work with whitenoise i just need this?? STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' instead MEDIA_ROOT and MEDIA_URL???

- BrunoSeixas 3 years, 7 months ago

yes i think this should work.

- scott 3 years, 7 months ago

hmmm okay in a few hours will start working with AWS S3 looks simple to use... but need to know when we create the account we need to put a credit card so my question is if we need to pay something in AWS S3??

- BrunoSeixas 3 years, 7 months ago

Yes it depends upon your usage, but I think it should be reasonable amount only.

- Vengat 3 years, 7 months ago

Can you close this ticket?

- Vengat 3 years, 7 months ago

could you please close the ticket if issue is solved

- bhanupriyakuchana123 3 years, 7 months ago


Latest Blogs