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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -