Django file upload with FTP backend

后端 未结 2 885
天涯浪人
天涯浪人 2021-02-04 18:34

I want to upload my files based on the example Need a minimal Django file upload example, however I want to store the files not locally, but on another server with the use of FT

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-04 19:20

    It looks like your import is wrong. If the file is named ftp.py the import should be:

    from ftp import FTPStorage
    

    Depending on where the file is relatively to your PYTHONPATH you might need to add more, e.g.:

    from your_app.ftp import ...
    

提交回复
热议问题