PDA

View Full Version : How to get pull path from Filefield??



poojagarg89
14 Jul 2012, 12:46 AM
I have a field in which I have browse button for uploading images
here is code:


xtype: 'textfield',
fieldLabel: "   Image1",
id: 'image1',
name: 'image1',
inputType:'file',
width:40


Suppose I browsed an image in this field n the value of that field is
C:\Documents and Settings\pgar\Desktop\Android\coursal3.jpg

Now when m getting value from this field through :


var image1 = Ext.getCmp("image1").getValue();
alert(image1);



I am getting value as "coursal3.jpg" in alert but I want full path value i.e.
"C:\Documents and Settings\pgar\Desktop\Android\coursal3.jpg"



can anyone help me for this ???


Thanks n Regards,
Pooja

scottmartin
14 Jul 2012, 6:52 PM
Are you referring to displaying the full path? Most browsers will add 'fakepath'.

Scott.

poojagarg89
15 Jul 2012, 10:13 PM
Actually I want to get the full path of the field so as to SAVE the image in database and to move that image to folder which is in my project.

But m getting only the name of the image not the full path so m unable to Save it as I can't get that image location so that my java code can move it to folder where I want it to GO.......

sword-it
15 Jul 2012, 11:20 PM
Hi

filefield sending file content not name try save content by stream

Regards