PDA

View Full Version : Sencha Touch File Upload



bigice
22 Mar 2011, 10:49 AM
Hello Frieds, how you doing?
I have a problem with inpuType:'file' on FormPanel
I got this error "Unexpected end of input" and the elements are correct.
here is the code:

{
xtype : 'textfield',
name : 'image',
label : 'Pic (3x4)',
inputType : 'file',
useClearIcon : false,
required : false,
useClearIcon : false
}

When i remove this object config the sencha form has been submited and i add this object config the form does not submit.

Some one can help me what is go on?
Thanks!

jay@moduscreate.com
24 Mar 2011, 4:48 AM
can't upload files from mobile safari.

bigice
24 Mar 2011, 4:53 AM
So what do you suggest for sencha touch app that want make upload file to server??
what can i do? can you help me?
thanks!

jay@moduscreate.com
24 Mar 2011, 4:54 AM
I think it can be done w/ phongap in a UI webview. But that means packaging an application.

bigice
24 Mar 2011, 4:58 AM
I Can no understand, it's so simple just xtype:'textfield', inpuType:'file' and done?? why is it not works?? how about android os???

AndreaCammarata
24 Mar 2011, 8:49 AM
I Can no understand, it's so simple just xtype:'textfield', inpuType:'file' and done?? why is it not works?? how about android os???

Hi bigice,
how jgarcia said, you can't no upload files from mobile safari cuz of Apple security limitations.
You can do what you want using PhoneGap or without it, developing a native Apple application that incapsule your Sencha Touch application inside a UIWebView like I've done and shown in this post (http://www.sencha.com/forum/showthread.php?119087-Aral-Disk-Manager-%28File-upload-from-your-iPhone-iPad-without-PhoneGap%29), but it's no simple if you are a new Sencha Touch user and if you don't know Objective C.

Hope this helps.