html5 - Multi-part Form with File Input JQuery Mobile -


i'm trying create jquery mobile page uploads video google app engine blobstore along associated title, description, etc.

here's html of form.

<form class="form-horizontal" action="{{ upload_url }}" method="post" enctype="multipart/form-data" data-ajax="false">   <input type="text" name="title" placeholder="title" id="basic" value="" data-ajax="false" />   <input type="text" name="description" placeholder="description" id="basic" value="" data-ajax="false" />   <input type="file" data-ajax="false" name="file" id="file">   <input type="submit" value="submit" name="sumbit" data-theme="b" data-ajax="false"> </form> 

the html generated in google app engine using code.

class mobileuploadpage(webapp2.requesthandler):   def get(self):     upload_url = blobstore.create_upload_url('/uploadvideo')     template_values = {       'upload_url': upload_url,     }      template = jinja_environment.get_template('mobileupload.html')     self.response.write(template.render(template_values))  

the upload url see action of form generated blobstore using following handler.

class uploadhandler(blobstore_handlers.blobstoreuploadhandler):   def post(self):   upload = self.get_uploads()[0]   video = videos(content=upload.key())   video.title = self.request.get('title')   video.description = self.request.get('description')   video.ratingdown = 0   video.ratingup = 0   video.creator = users.get_current_user().nickname()   uniuqeidfound = false   newid = random.randint(1000,9999)   while(uniuqeidfound == false):     vids = db.gqlquery("select * "                        "from videos ")      uniuqeidfound = true     v in vids:       if (v.videoid == newid):         newid = random.randint(1,10000)         uniuqeidfound = false   video.videoid = newid   db.put(video)   self.redirect('/home') 

the upload url generated , appears on page. on browser version of our site, works perfectly. however, when trying upload video iphone via jqm mobile page blobstore, form not submit.

in jqm documentation, says multi-part form input file doesn't work ajax , should add data-ajax=false tag parent form. i've done doesn't seem help.

can see why?

have tried:

$.mobile.ajaxenabled = false; 

or

$.mobile.ajaxformsenabled = false; 

also can take @ specific file upload plugins:

http://www.plupload.com/example_queuewidget.php

or

https://github.com/filamentgroup/jquery-custom-file-input


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -