CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge -> Tips & Solutions

 Custom file upload folder (PHP)

Print topic Send  topic

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

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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