Hello bhupat,
using FileUploadField component in the form, you can get a its model - FileUpload. This fileUpload variable contains _all_data_ of uploaded file, including file name.
Then you can save it in any path on your server.
this snippet pasted from upload example:
In the example it is a system temporary directory
protected void onSubmit()
{
final FileUpload upload = fileUploadField.getFileUpload();
if (upload != null)
{
// Create a new file
File newFile = new File(getUploadFolder(), upload.getClientFileName());
// Check new file, delete if it allready existed
checkFileExists(newFile);
try
{
// Save to new file
newFile.createNewFile();
upload.writeTo(newFile);
UploadPage.this.info("saved file: " + upload.getClientFileName());
}
catch (Exception e)
{
throw new IllegalStateException("Unable to write file");
}
}
}
Cheers,
Oleg
Thursday, August 30, 2007, 7:18:06 PM, you wrote:
bp> Hi,
bp> Anyone please guide me to fit upload example in Forminput example,
bp> my requirement is i want a develop
bp> a single form with following components
bp> TextField
bp> ListMultiplechoice
bp> FileUpload
bp> i am facing a problem in getting fileupload path data.
bp> Thanks in advance
bp> Bhupat
--
Best regards,
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]