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

upload issue

Community Beginner ,
Jun 19, 2006 Jun 19, 2006

Copy link to clipboard

Copied

I am trying to upload a file to the server using cffile. I want to force a filename(scheduleupload.mdb) and the location(C:\upload\schedule). This code works great on my test box. The upoaded file goes to C:\upload\schedule\SCHEDULEUPLOAD.MDB

However, on my server, this same code is trying to create a folder called SCHEDULE.MDB and then placing the file into that folder, i.e. C:\upload\schedule\SCHEDULEUPLOAD.MDB\scheduletest.mdb where scheduletest.mdb is the filename uploaded. Any ideas why the same exact code would behave differently on 2 machines(both running xp)?

Thanks
Grant

TOPICS
Advanced techniques

Views

313

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

correct answers 1 Correct answer

Community Beginner , Jun 21, 2006 Jun 21, 2006
Thanks BKBK and SafariTech.... It seems my test server and prod server had different hotfixes on there. When I applied hotfix 2 to 7.01 as SafariTech suggested the problem was fixed. Thanks again for the help.

Votes

Translate

Translate
Community Expert ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

destination="c:\upload\schedule\"

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
Community Beginner ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

Thanks for the reply. However I want to force the name of the file to SCHEDULEUPLOAD.MDB...

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
Community Expert ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

However I want to force the name of the file to SCHEDULEUPLOAD.MDB
That is what should happen when you use destination="c:\upload\schedule\". The destination attribute must be a folder. What you did earlier was to make it a file, which is incorrect.

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
Engaged ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

Actually he is using the format correctly ( and that's how it worked prior to the 701 updater), however there is a bug in MX701 if you have not yet applied the appropriate hotfix.

Uploaded files, of "known" file extensions, will cause the server to create a directory of the file named, rather than upload the file. We had the same issue with images until we found the hotfix.

After you apply the hotfix, it should work with the code you already have.

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=aae43964

Your issue is # 61212

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
Community Expert ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

Actually he is using the format correctly
Even if that worked before, it is a "forced" solution. Many of those are possible in Coldfusion. Luckily for us. However, some of them, like the present tend to lapse now and again. Notice that the fix is for ' cffile action="upload" no longer wrote a file with a file specification in the "destination" field. '

Now, go to the cffile manual. It defines destination as the "Pathname of directory in which to upload the file.". Hence, destination is a directory path, not a file path. My advice is that one should go by the book, especially when one is getting unexpected results.

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
Community Beginner ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

LATEST
Thanks BKBK and SafariTech.... It seems my test server and prod server had different hotfixes on there. When I applied hotfix 2 to 7.01 as SafariTech suggested the problem was fixed. Thanks again for the help.

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