PDA

View Full Version : File Uploading



farhad hussien
21 Nov 2011, 11:11 PM
I'm new for Sencha touch,
can You help me for Upload a file or Image from form
Give me the full sorce code for that,

its Very urgent boss
Thankyou

mitchellsimoens
22 Nov 2011, 11:05 AM
Mobile devices do not support uploading a file in a web browser. The only way to do this is to use something like PhoneGap and use the plugin they have although this will have to be deployed via the app stores.

farhad hussien
23 Nov 2011, 9:42 PM
Hi,
Can Any one give the how to implement file upload in sencha touch and full source code,examples of that

mitchellsimoens
24 Nov 2011, 9:59 AM
Like I said, mobile devices do not allow file uploading outside of a native wrapper.

farhad hussien
27 Nov 2011, 9:51 PM
Hi,
Can Any one give me the file uploading examples using form submit in Chrome.

Give me the Source code and also included JS Scripts.....for that.

it's very Importent,I'm new for Sencha Touch.

renulren
29 Nov 2011, 4:58 AM
items: [
{
xtype : 'textfield',
name : 'image',
label : 'Pic (3x4)',
inputType : 'file',
useClearIcon : false,
required : false,
useClearIcon : false
},
{
xtype: 'button',
text: 'Upload',
ui: 'confirm',
handler: function(){
this.submit({
url: 'http://.../upload.php',
waitMsg: 'Uploading file...',
success: function(form,action){
console.log('Success');
}
});
},
scope: this
}]

This can get you started (include this in a form) but it is useless without phonegap. The file input will only work in chrome / safari.

farhad hussien
6 Dec 2011, 4:53 AM
Hi,
Any body please give the source code for image upload using sencha touch for mobile devices or web App.

I'm new for using Sencha Touch,

Is it another way to upload image using html5 or other technologies,

I need image uploading Like a Face Book.


Please Help.

I'm waiting for Your Valuable Replay.

mitchellsimoens
6 Dec 2011, 6:10 AM
Hi,
Any body please give the source code for image upload using sencha touch for mobile devices or web App.

I'm new for using Sencha Touch,

Is it another way to upload image using html5 or other technologies,

I need image uploading Like a Face Book.


Please Help.

I'm waiting for Your Valuable Replay.

YOu can only upload if you wrap your app in a native application with PhoneGap or the like. This means you have to submit your app to the app stores.

nareshkokkula
25 Mar 2014, 5:44 AM
hi,

I'm using Sencha Touch 2.3.1 Library.

Please find my code below.



Ext.Msg.show({
buttons: [],
message: 'Please wait',
width: 300
});

form.submit({
clientValidation: false,
url: 'file.upload?name=' + names + '&target=' + target + '&overwrite=' + overwrite + '&folderid=' + folderid + '&storeinrepository=' + storeinrepository,
waitMsg: 'Uploading your file...',
success: function (fp, o) {
Ext.Msg.hide();
}


I'm getting issue at following function in sencha-touch-all-debug.js
at doBeforeSubmit() method in formpanel class


if (success) { if (statusResult && responseText && responseText.length == 0) {
success = true;
} else {
if(!Ext.isEmpty(response.responseBytes)) {
success = statusResult.success;
}else {
if(Ext.isString(responseText) && response.request.options.responseType === "text") {...}


Error:
Uncaught TypeError: Cannot read property 'options' of undefined

Can someone please help me with this.

Thanks,
Naresh