timdw
Posts: 25
|
Posted: 12/08/2005, 2:15 PM |
|
After messing about for an hour or so, I've found that if you want to change the upload folder without getting any validation errors, you need to do $Component-><FileUploadComponentName>->FileFolder = <Your computed folder value> in two places: BeforeSelect on the parent record and BeforeProcessFile on the component itself. The BeforeSelect is just before the SetValue method is called on the upload component, which will complain if it can't find the file, which it won't as it's not in the default location. The BeforeProcessFile is to ensure the uploaded file goes where you want it.
This is pretty poor IMO - I should only have to specify a calculated target folder once. Even better, put the folder in the DB!
Anyone knows a better way, please let me know.
Tim
|
|
|
timdw
Posts: 25
|
Posted: 12/09/2005, 11:54 AM |
|
Ignore me. I must have made a mistake when referencing the control as it works if you place the assignment in the page AfterInitialize event.
|
|
|
wkempees
|
Posted: 02/19/2006, 7:50 AM |
|
Which still is a good tip-and-solution.
Thanks
"timdw" <timdw@forum.codecharge> schreef in bericht
news:264399e0d93e5f8@news.codecharge.com...
> Ignore me. I must have made a mistake when referencing the control as it
> works
> if you place the assignment in the page AfterInitialize event.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
Rakesh
|
Posted: 02/23/2006, 1:36 AM |
|
how will i browse images foldar and upload all foldar Images?
|
|
|
|