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

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

c++ - NetBeans Remote Development with additional configuration -

visual studio - TFS will not accept changes I've made to a Java project -