python - How to get a file from curled url -
i have following curl, pass file url:
curl -f file=@/users/david542/spreadsheet.xls http://localhost:8000/spreadsheet
and in view:
@csrf_exempt def wb_spreadsheet(request): # how file?? return httpresponse('hello!')
how file object process here?
it passed in request.files
--
@csrf_exempt def wb_spreadsheet(request): file = request.files.get('file') return httpresponse('hello!')
Comments
Post a Comment