You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Alex D. Fleming" <lo...@yahoo.com> on 2006/10/05 06:14:32 UTC

Can we save the Path to the file with File name in a cookie

Hi,
 
 I have created a screen to upload the data in ofbiz table.
 Is there any thing implemented in ofbiz to save the path to the file with the File name in the cookie so that next time when we come to the upload screen we don't have to select file again and again.
 
 Actually in my case the name and location of the file will always remain the same.That's why I am looking to implement this feature in ofbiz.
 
 Anybody has implemented this or Any help/hint would be greatly appreciated.
 
 Thanks 
 Alex D. Fleming
 
 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

Re: Can we save the Path to the file with File name in a cookie

Posted by John Martin <pb...@gmail.com>.
Here is another example of an AJAX client uploading a file via XML.

http://www.codeproject.com/useritems/AJAXUpload.asp

Re: Can we save the Path to the file with File name in a cookie

Posted by John Martin <pb...@gmail.com>.
My experience in the past is that the browser doesn't allow you any
control of <input type="file"...> since it could be easily abused.
Someone could place it on the form hidden, prepopulate it with any
filename and when the user clicks submit, they could get any file on
the user's box.

I poked around a bit because I figured this is something that could be
done in AJAX.  Sure enough, there is the capabilities of doing it,
scary though because what I warned about can be done...

Check out this article: http://www.15seconds.com/issue/010522.htm

They take and create a XML doc in javascript, import a file locally
and then post the XML.

 ado_stream.Type = 1;  // 1=adTypeBinary
   ado_stream.Open();
   ado_stream.LoadFromFile("c:\\tmp\\myfile.doc");
   // store file content into XML node
   l_node1.nodeTypedValue = ado_stream.Read(-1); // -1=adReadAll
   ado_stream.Close();

HTH?

John

Re: Can we save the Path to the file with File name in a cookie

Posted by "Alex D. Fleming" <lo...@yahoo.com>.
Anybody of you handled such situations in ofbiz.
 If yes....please help
 
 Thx 
 Alex

"Alex D. Fleming" <lo...@yahoo.com> wrote: Hi,
 
 I have created a screen to upload the data in ofbiz table.
 Is there any thing implemented in ofbiz to save the path to the file with the File name in the cookie so that next time when we come to the upload screen we don't have to select file again and again.
 
 Actually in my case the name and location of the file will always remain the same.That's why I am looking to implement this feature in ofbiz.
 
 Anybody has implemented this or Any help/hint would be greatly appreciated.
 
 Thanks 
 Alex D. Fleming
 
   
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out.