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

java - How to Configure JAXRS and Spring With Annotations -

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

php - Create image in codeigniter on the fly -