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

upload files to os x with cffile

Explorer ,
Dec 28, 2012 Dec 28, 2012

Copy link to clipboard

Copied

I'm working in my dev environment on my macbook pro. It is setup like this:

CF 10 and sql server running on parallels 8. I run cf builder on OS X along with Cornerstone for Subversion control All my web files are located on my mac os x hard drive.

My web app has several forms in which you can upload files. I can not seem to figure out the right path to put in the destination field for cffile. I have tried /path/to/location/ format but it does not work. Any ideas?

Thanks in advance.

TOPICS
Advanced techniques

Views

1.2K

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 ,
Dec 29, 2012 Dec 29, 2012

Copy link to clipboard

Copied

I don't know about Macs, but on a Windows machine the path starts with a drive letter.

What does the term "does not work" mean?  Are you getting an error?  If so, what is it.

Long term, when you put your app on a production server somewhere, your paths might not be the same.  It would behoove you to learn what the path will be on the production machine as soon as possible so that your app still works when you promote it.

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 ,
Dec 29, 2012 Dec 29, 2012

Copy link to clipboard

Copied

1. Macs dont have drive letters

2. I was getting a 500 error but I finally got IIS to give me the CF error.

The destination R:/EngagEnterprise/ml/uploads specified in the file's upload action is invalid.


The destination either does not exist or is not accessible by this tag.

3. I know what the path would be on my production sever, it windows based and I just change the values in my settings table.

Since my post from yesterday, I set CF to run under my account, which is the same name on my mac as well and I realized that Parallels assigns a drive letter to my hard drive on my mac. I changed my path to use this drive letter and the above error is what I get. It appears to be a permissions issue with my account not being able to weite to thst directory.

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 ,
Jan 01, 2013 Jan 01, 2013

Copy link to clipboard

Copied

LATEST

If \path\to\location\ is under the web root, then try

destination="#expandPath('\path\to\location\')#"

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