Opened 18 years ago
Closed 18 years ago
#2423 closed defect (worksforme)
Admin uploads go to admin media folder, not MEDIA_ROOT
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | normal | Keywords: | upload_to |
Cc: | tyson@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have the following settings in my settings.py file:
MEDIA_ROOT = '/Users/ttate/Desktop/fallingbullets/project-media/' MEDIA_URL = 'http://localhost:8000/project-media/' ADMIN_MEDIA_PREFIX = '/media/'
I also have a model with the following:
image = models.ImageField(upload_to="portfolio", core=True)
When I use the admin interface to upload an image, it gets placed in /media/portfolio
and not /project-media/portfolio
, where it should have gone.
Change History (4)
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
comment:3 by , 18 years ago
Reverting to the following settings seems to make things work. I hope. :/
MEDIA_ROOT = '/Users/ttate/Desktop/fallingbullets/media/' MEDIA_URL = 'http://localhost:8000/media/' ADMIN_MEDIA_PREFIX = '/media/admin/'
comment:4 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
No one on IRC was able to reproduce this problem, so I'm marking as worksforme until it comes around and bites me, again. Hopefully I'll have better debug info about why it happens next time.
After deleting all uploaded images and their associated database entries, uploads are completely broken. Uploading appears to work, but no files are actually uploaded to the media directories. The console gives no error messages at all.