Skip to main content
Participant
June 19, 2006
Answered

upload issue

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

This topic is closed to new replies. Start a new post to keep the conversation going.
gemckayCorrect answer
Participant
June 22, 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.

6 replies

BKBK
Community Expert
Community Expert
June 21, 2006
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.

Translate
gemckayAuthorCorrect answer
Participant
June 22, 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.
Translate
Inspiring
June 21, 2006
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
Translate
BKBK
Community Expert
Community Expert
June 20, 2006
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.

Translate
BKBK
Community Expert
Community Expert
June 20, 2006
destination="c:\upload\schedule\"

Translate
gemckayAuthor
Participant
June 20, 2006
Thanks for the reply. However I want to force the name of the file to SCHEDULEUPLOAD.MDB...
Translate