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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Alex D. Fleming
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.
Reply | Threaded
Open this post in threaded view
|

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

Alex D. Fleming
Anybody of you handled such situations in ofbiz.
 If yes....please help
 
 Thx
 Alex

"Alex D. Fleming" <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

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

John Martin
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
Reply | Threaded
Open this post in threaded view
|

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

John Martin
Here is another example of an AJAX client uploading a file via XML.

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