Suspicious File Operation..The joined path … is located outside of the base path component

前端 未结 1 1757
耶瑟儿~
耶瑟儿~ 2021-01-22 15:09

Trying upload .png files into admin image table I get error:

SuspiciousFileOperation at /admin/products/productimage/add/ The joined path (/product/imag

相关标签:
1条回答
  • 2021-01-22 15:30

    You've made some changes and those changes are not synced with DB. I've searched it on implementation level and this is no bug. Make sure you are using updated version of Pillow and image = models.ImageField(upload_to="whateverfolder/". Then sync using "python manage.py makemigrations" if you are using 1.8 and above. If you are using below 1.8 do the "python manage.py syncdb and your problem will be resolved. For future make it habit to sync models.

    0 讨论(0)
提交回复
热议问题