Django FileField upload is not working for me

前端 未结 1 1325
温柔的废话
温柔的废话 2020-12-15 07:33

I have been scratching my head FileField. Does the FileField require a seperate process?

Although my url gets saved .. but my file doesn\'t get uploaded ... what am

相关标签:
1条回答
  • 2020-12-15 08:10

    You need to include the files when creating the form

    oplinkform = oplinkform(request.POST, request.FILES)
    

    Also make sure that your form has the correct enctype

    <form enctype="multipart/form-data"></form>
    
    0 讨论(0)
提交回复
热议问题