artshumrc / giza

JSON API (for TMS Database) and Django 2 application for Digital Giza
http://giza.fas.harvard.edu/
7 stars 5 forks source link

Enable file uploads to admin backend with chosen storage solution #110

Open lukehollis opened 3 years ago

lukehollis commented 3 years ago

Following up from email, when @npicardo or I attempt to upload files to the admin interface, we're unable to attach and upload files and receive this error message:

Screen Shot 2020-12-15 at 1 25 06 PM
rsinghal commented 3 years ago

I think the following needs to be done: Create directory that images will be saved to. Set MEDIA_ROOT and MEDIA_URL in settings.py: https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-MEDIA_ROOT Add directory from MEDIA_ROOT to Apache config (let FAS RC know about change for puppet)

rsinghal commented 3 years ago

Question/Concern - do we need to set limits on size of image that can be uploaded?

rsinghal commented 3 years ago

Possibly relevant: https://stackoverflow.com/questions/5517950/django-media-url-and-media-root