
joseph2k
Posts: 72
|
| Posted: 04/19/2007, 10:02 PM |
|
I am using fileupload component and have current filefolder set to .\photos\hold
On Before show event on page, record, etc I change at runtime to point to .\photos\id00001
due to userid logged. I want separate folders to save photos.
If I add a new photo it ends up in correct place under .\photos\id00001 but when page reloads it then gives me an error saying file xxxxx does not exist. Well, it does not exist under the design setting of "\photos\hold" but rather where I set the runtime setting of file folder, " .\photos\id00001"
So it seems that you cannot reset file folder location at runtime , submit a new file, reload page and have a CLEAN error check because it's using orginal design settings.
I guess that the check for if file exists is being done before the "BEFORE SHOW" event of a page. Anybody run into this problem before?
I thought the page's BEFORE SHOW is the first event.
|
 |
 |
Damian Hupfeld
|
| Posted: 04/20/2007, 3:01 AM |
|
You might want to bounce this one off support. You might need to edit the
behaviour of the file upload component.
"joseph2k" <joseph2k@forum.codecharge> wrote in message
news:54628496eaa6f2@news.codecharge.com...
>
> I am using fileupload component and have current filefolder set to
> \photos\hold
>
> On Before show event on page, record, etc I change at runtime to point to
> \photos\id00001
> due to userid logged. I want separate folders to save photos.
>
> If I add a new photo it ends up in correct place under .\photos\id00001
> but
> when page reloads it then gives me an error saying file xxxxx does not
> exist.
> Well, it does not exist under the design setting of "\photos\hold" but
> rather
> where I set the runtime setting of file folder, " .\photos\id00001"
>
> So it seems that you cannot reset file folder location at runtime , submit
> a
> new file, reload page and have a CLEAN error check because it's using
> orginal
> design settings.
>
> I guess that the check for if file exists is being done before the
> "BEFORE
> SHOW" event of a page. Anybody run into this problem before?
>
> I thought the page's BEFORE SHOW is the first event.
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
damian
Posts: 838
|
| Posted: 04/22/2007, 6:17 AM |
|
You might want to bounce this one off support. You might need to edit the
behaviour of the file upload component.
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
joseph2k
Posts: 72
|
| Posted: 04/22/2007, 12:57 PM |
|
Thanks.... someone else contacted me about similar problem, its tricky because the CCS code checks never took this into account apparently. So you have to set filefolder a couple of times at various events to get around errors. I am still debugging all the possible cases that will come about...
|
 |
 |
fredi
Posts: 4
|
| Posted: 04/22/2007, 2:58 PM |
|
Hi,
I had the same problems (in PHP),
after days, I changed the php code by hand and than I found out,
that you can use php-functionality in the property-fields of CCS
so in this case, I used the $_GET[] function to retrieve my foldername and it seems to work
again, in the propertyfield 'filefolder' of the upload-object I typed in:
/my/path/to/the/files/{$_GET['userid']}
and with that it works, I tried out everything else which did not work
I hope I could help....
|
 |
 |
joseph2k
Posts: 72
|
| Posted: 04/23/2007, 11:21 AM |
|
hmmm... interesting... I will look into that...
I eventually got it to work by reseting file folder in several critical events.. definitely not trivial.
|
 |
 |
JayEdgar
Posts: 77
|
| Posted: 01/25/2008, 12:23 PM |
|
Would you share the events that have to be updated? I'm struggling with this. Thanks!
Jay
|
 |
 |
|

|
|
|
|