@Saurabh: Can you share complete code, So that i can easily get, how to upload the file and how it works?
On Thu, Dec 31, 2009 at 11:54 AM, Saurabh Surana <suranasaur...@gmail.com>wrote: > Hi, > Thanks for the reply. > I am not an expert in this, but what I understood is you are asking me to > add one more variable to the URLVariables object which I assign to > URLRequest's Data property. Can you tell me what should be the name of the > variable to which I will assign the absolute path? And also I didn't > understood this line from your post "... to upload instead of using flex > upload directly read the file frm the location", if I don't use flex's > upload directly then how to the upload otherwise? > > I have following code which I am using for doing the upload > ======================== > var fileUpload:FileReference = new FileReference() > var request:URLRequest = new URLRequest("mywebserver/datafolder"); > > var variables:URLVariables = new URLVariables(); > variables.op = "fileupload"; > variables.proc="sync"; > > variables.username = "username"; > request.data = variables; > > try > { > fileUpload.upload(request); > } > catch(error:Error) > { > //log the error > } > ======================== > > I am using appropriate event handlers, but to simplify the post I removed > it from here. > > So in this code how do I tell that use the file from a absolute path, lets > say I have a variable _filePath which stores the path from which I have to > upload the file. > > Regards, > Saurabh > > > On Wed, Dec 30, 2009 at 12:13 AM, Kikka <venkatakrishna...@gmail.com>wrote: > >> HI.. have u uploaded file before in Flex. if yes then you know how the >> file upload works . usually after selecting the file u'll be calling >> the fileref's upload method where u'll be passing a request object. in >> that request object u create a parameter and put the absolute path of >> the file which u want to upload instead of using flex upload directly >> read the file frm the location >> >> On Dec 28, 12:55 pm, Saurabh <suranasaur...@gmail.com> wrote: >> > Hi, >> > I want to do a file upload in my flex application. >> > I know there is FileReference class which allows me to browse to a >> > file and then using Upload method I can upload the file. >> > But the problem is that, I have a absolute path of a file which I want >> > to upload, I don't want to show the browse control to the user to >> > select the file and then go for upload. I have the path of the file >> > and want to use that path only to do the upload. >> > >> > How can I skip the FileRefrence's browse and specify the absolute >> > path? I tried name property but its read only. >> > >> > I don't want to do this in my flex web application and not in AIR. >> > >> > Any ideas? >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Flex India Community" group. >> To post to this group, send email to flex_in...@googlegroups.com. >> To unsubscribe from this group, send email to >> flex_india+unsubscr...@googlegroups.com<flex_india%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/flex_india?hl=en. >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to flex_in...@googlegroups.com. > To unsubscribe from this group, send email to > flex_india+unsubscr...@googlegroups.com<flex_india%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. >--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To post to this group, send email to flex_in...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.