CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 File upload not working

Print topic Send  topic

Author Message
jmdoria

Posts: 1
Posted: 05/11/2011, 7:30 PM

Hi,

I'm a newbie and I'm trying to make the file upload to work but no matter what I do the file uploaded is copied to the temp directory but not to the File folder. I even have inter-changed the temp folder assigned with the File folder and still the file is copied just to the new temp folder.

I'm using php 5.3.5 and IIS on a Windows x64bit

The permissions in both folders are the same.

Thanks
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 07/29/2011, 10:41 AM

jmdoria,

Have you figured this out or do you still need assistance with this?
View profile  Send private message
dunechi1d

Posts: 23
Posted: 08/18/2011, 12:27 AM

I have the same issue on a PHP Linux system.

I tried to debug this by adding code to the "Before Process File" and "After Process File" events but these events never get triggered!

The bottom line is that the file gets uploaded with a unique. name to the designated "temp" folder but is never moved to the "File Folder"
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 09/05/2011, 10:21 AM

@jmdoria

What are the settings that you have for upload form?

@dunechi1d

It seems as if you are almost there. What code did you put it the Before/After Process File event?
View profile  Send private message
dunechi1d

Posts: 23
Posted: 09/05/2011, 2:18 PM

Quote mamboBROWN:

@dunechi1d

It seems as if you are almost there. What code did you put it the Before/After Process File event?

The classic exit("kuku"); :-) ... just to see the code gets executed. It doesn't :-(
View profile  Send private message
ckroon

Posts: 869
Posted: 09/07/2011, 5:03 PM

Post your code so we can take a look..has to be something amiss...
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 09/20/2011, 9:02 PM

jmdoria,

Are you still having problems resolving this issue?
View profile  Send private message
ckroon

Posts: 869
Posted: 10/03/2011, 12:05 PM

Is your FIle Uploader in an Update Panel?
The File Uploader does not work within an Update Panel.

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
dunechi1d

Posts: 23
Posted: 10/07/2011, 8:21 AM

One of my tests was in an "Update Panel" so that would explain why that didn't work...

On the other hand, here is a formula to see the problem on a clean page. (My server is a standard LAMP):

1. create a new CCS page ("file_upload_tests")
2. Insert a "File Upload" object. CCS will ask whether to create a new form. Say "OK"
3. in the "File Upload" properties change the "Temporary folder" to ./temp and the "File Folder" to ./uploaded
4. make sure "temp" and "uploaded" folders exists in the same folder as your test page on the server and that their write permissions are 755.
4. Publish the page
5. Browse to "file_upload_tests.php" and upload a small file. (cydia.log" in this example)

My results are that after uploading "cydia.log" I find "201110070321360.cydia.log" in the temp folder but nothing in the the "uploaded" folder. Note that the prefix of the uploaded file name is based on the date and time of upload so you can upload the same file many times and end up with multiple copies in your temp folder...

In order to debug the issue I did the following:

1. Add a "Before Process File" Event to the "File Upload" object ("custom code")
2. Add the following under where it says "// Write your own code here." :
exit("here I am");
3. Publish the page
4. Browse to "file_upload_tests.php" and upload a small file. (cydia.log" in this example)

My results are the same as in the first example. In other words, the "BeforeProcessFile" Event wasn't invoked.

Now, just for the LOLs:
1. go to the properties of the "File Upload" object and change the "Allowed file Masks" to *.txt.
3. Publish the page
4. Browse to "file_upload_tests.php" and click on "Browse..."

My results are that I see all file types in the folder that I'm browsing instead of just the ".txt" files.

I hope this clarifies a few of the issues with the "File Upload" object.

Have a nice day.
View profile  Send private message
tfertil

Posts: 43
Posted: 12/10/2011, 12:25 PM

Hi dunechi1d,

If you're still having troubles with this, I found a possible cause:

I used a FileUpload component NOT associated to any table in my database. I had the same problems: the file is uploaded only to the temp folder, and no events (Before/AfterProcessFile) are triggered.

I then associated the form to a table with a text field for the filename, and voila! The file is uploaded to the correct folder and the events are triggered.

So... check your form is assigned to a table, and the upload component to a column of your table .

Regards,
View profile  Send private message
xxzy

Posts: 1
Posted: 01/16/2012, 1:37 AM

I used a FileUpload component NOT associated to any table in my database. I had the same problems: the file is uploaded only to the temp folder, and no events (Before/AfterProcessFile) are triggered.

I then associated the form to a table with a text field for the filename, and voila! The file is uploaded to the correct folder and the events are triggered.


<a href="http://www.myterastock.com/">Tera Gold</a>
<a href="http://www.gobuytera.com/">cheap tera gold</a>
<a href="http://www.tera4sale.com/">cheap tera gold</a>

_________________
zy xx
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.

Web Database

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.