[Answered ]-Retrieve Json from request.FILES in Django without writing to file

2👍

If you want to get the content of uploaded file, you can directly use the .read() api.

You are assigning jsonData to None and then trying to call encode() method of it, which is incorrect.

Something like:

if request.FILES.has_key('data'):
    file = request.Files['data']
    data = file.read()
    #you have file contents in data
👤Rohan

Leave a comment