• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

File upload doesn't work and no error! What's going on?

Explorer ,
Jun 23, 2006 Jun 23, 2006

Copy link to clipboard

Copied



We are migrating our intranet from ColdFusion 5 on Solaris to ColdFusion MX 7 on Linux and I'm testing out the existing applications on the new server. The processing page for a file upload is using CFFILE with ACTION="upload". The page finishes processing fine, no error, and continues as if it was successful but the file never actually gets to the destination directory. I tried with larger files and it did take longer (so the file appeared to get transmitted), but it still does not get saved to the server's file system. This all works fine on the current system running CF5. I've tried the CFFILE destination with and without a slash at the end - no difference. We have ColdFusion 7.0.1 installed. Hot fix 2 has been applied but that did not fix the problem.

Any ideas?
TOPICS
Advanced techniques

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 23, 2006 Jun 23, 2006

Copy link to clipboard

Copied

Can you see if the file is getting to the webserver's (not ColdFusion)
temp file directory?

When a file is uploaded from the browser the webserver(IIS|Apache|etc)
upload it to a temp location, then all CFFile does is copy the file
from the temp directory to where ever specified.

So you can see if the problem is failing before or after this point.

Grant wrote:
>
>
> We are migrating our intranet from ColdFusion 5 on Solaris to ColdFusion MX 7
> on Linux and I'm testing out the existing applications on the new server. The
> processing page for a file upload is using CFFILE with ACTION="upload". The
> page finishes processing fine, no error, and continues as if it was successful
> but the file never actually gets to the destination directory. I tried with
> larger files and it did take longer (so the file appeared to get transmitted),
> but it still does not get saved to the server's file system. This all works
> fine on the current system running CF5. I've tried the CFFILE destination with
> and without a slash at the end - no difference. We have ColdFusion 7.0.1
> installed. Hot fix 2 has been applied but that did not fix the problem.
>
> Any ideas?
>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 23, 2006 Jun 23, 2006

Copy link to clipboard

Copied

I figured out that the permissions on the directory where the file was supposed to be put were not set correctly (they had to be owned by Apache), but that brings up 2 more questions:

1. Why did I not get an error if ColdFusion could not write the file to the directory? It wasn't logged either.
2. Why are the spaces in filenames that are uploaded with CFFILE not being replaced with underscores like they were in CF5? It still seems to be working, but I'm confused as to why this feature would change.

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 23, 2006 Jun 23, 2006

Copy link to clipboard

Copied

Grant wrote:
> I figured out that the permissions on the directory where the file was supposed
> to be put were not set correctly (they had to be owned by Apache), but that
> brings up 2 more questions:
>
> 1. Why did I not get an error if ColdFusion could not write the file to the
> directory? It wasn't logged either.

Is there a chance the error was somehow trapped or suppressed?

> 2. Why are the spaces in filenames that are uploaded with CFFILE not being
> replaced with underscores like they were in CF5? It still seems to be working,
> but I'm confused as to why this feature would change.

I didn't know CF5 did this? I did not use 5 for very long. Pretty much
went from 4.5 to 6.0 several years ago, now on 7.01|2.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 23, 2006 Jun 23, 2006

Copy link to clipboard

Copied

>> 1. Why did I not get an error if ColdFusion could not write the file to the
>> directory? It wasn't logged either.
>
>Is there a chance the error was somehow trapped or suppressed?

I did not put any code in (like CFTRY) that could have caught it. Is there something else that may have suppressed an error that I'm not thinking of?

>> 2. Why are the spaces in filenames that are uploaded with CFFILE not being
>> replaced with underscores like they were in CF5? It still seems to be working,
>> but I'm confused as to why this feature would change.
>
>I didn't know CF5 did this? I did not use 5 for very long. Pretty much
>went from 4.5 to 6.0 several years ago, now on 7.01|2.

Have you ever run into problems reading, editing or deleting files on a Linux system that had spaces in the filenames?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 04, 2007 Apr 04, 2007

Copy link to clipboard

Copied

I'm having a similar problem... We upgraded from CF 5 to 7... and if you upload a really small file, it works fine, but if you upload something over 300 K, it just goes to a blank page... and it doesn't even get to the cffile.. I put something like Done followed by a cfabort before the cffile and I don't even see that. Is there a new setting for max upload? In CF Administrator we have "Maximum size of post data" set to 500 MB so that shouldn't be a problem.... we also upgraded to IIS 6 and Windows 2003

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 05, 2007 Apr 05, 2007

Copy link to clipboard

Copied

I found the solution:
http://www.adobe.com/go/8d933f86

I had to replace my forms and inputs with cfforms and cfinputs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2007 Apr 09, 2007

Copy link to clipboard

Copied

I have tried this but that solution does not work for me. Did it work for you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 10, 2007 Apr 10, 2007

Copy link to clipboard

Copied

LATEST
We also had to have users who tried to upload since we went to MX7 clear their cache (Tools -> Internet Options ->Delete Cookies & Delete Cookies) and then it worked. Luckily we only have 800 users and only a few dozen tried to upload something big in that week.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation