
クライアント
Vue and Axios
let formData = new FormData();
for (const filename in this.files) {
formData.append(filename, this.files[filename].getFile())
}
axios.post('/upload', formData, {
headers: {
'content-type': 'multipart/form-data'
}
})
サーバー
class UploadView(View):
def post(self, request: HttpRequest, *args, **kwargs):
for key, value in request.FILES.items():
print(key)
print(value)

- 作者: 横瀬明仁
- 出版社/メーカー: NextPublishing Authors Press
- 発売日: 2018/08/26
- メディア: オンデマンド (ペーパーバック)
- この商品を含むブログを見る