Heroku django project read-only file system

后端 未结 2 1815
轮回少年
轮回少年 2021-01-12 05:11

I\'m deploying django project on heroku, it works fine, but in django admin, when i\'m trying to upload image i got error:

OSError at /admin/blocks/block/ad         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 05:59

    Yes, you can not upload media files at heroku. Only via git you can deploy things and if you deploy static or media files they will be available with some workarounds.

    For live file upload you should consider to use an external service like Amazon S3. There is an excellent library for django to deal with it (its also suggested by the heroku dev site, as far as I remember): django-storages

提交回复
热议问题