Forums / Developer / Storing the path to a file

Storing the path to a file

Author Message

James Packham

Friday 05 March 2004 3:22:15 am

Hi,

I've got a little annoying problem:

I have a very long input form for one of my classes, of which one of the attributes is an image. If I make a mistake and the template has to be reloaded I 'lose' the location of the file from the browse box. If I just ignore this (simulating a user who might not have noticed) and successfully submit the object without respecifying the image, it (the image) isn't 'attached' to the object!

After hunting around in the $http.post variables I'm at a loss to find the text containing the location of the file. Has anyone got any stories/ideas about how they got around this? How is this text stored and how can I display it in the 'browse box'? Can I use some kind of section show to hide the input once the location of the image has been specified?

Thanks in advance,

James

liu spider

Friday 05 March 2004 9:12:30 am

first, you can set the image as compulsory, so if the user forget to upload the image, an error will occur

Second, let the users hit the store button as soon as they specified the image file

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd