CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Storing multiple photos in separate directory, runtime versus design time

Print topic Send  topic

Author Message
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.
View profile  Send private message
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.... :)
View profile  Send private message
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...
View profile  Send private message
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....
View profile  Send private message
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.
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.