Here is my phonegapfile file file: this file sends data to the django server, but I cannot save the file to the server. What will be the python view function to find and save the file?
<!DOCTYPE HTML> <html> <head> <title>File Transfer Example</title> <script type="text/javascript" charset="utf-8" src="cordova-2.5.0.js"></script> <script type="text/javascript" charset="utf-8"> </script> </head> <body> <h1>Example</h1> <p>Upload File</p> </body> </html>
Views.py
@csrf_exempt def uploadPhonegapFile(request): print "-------- hitting the url" to_json={} return HttpResponse(simplejson.dumps(to_json), mimetype= 'application/json')
This download request gets to the server, and I get the print "----------------- clicking on the URL" So, how can I catch the file here? or else is there a way to save the file in my server folder?
source share