uploadableFile adding slash to beginning of file name

9 views
Skip to first unread message

Cubes

unread,
Sep 29, 2011, 6:39:33 PM9/29/11
to ColdFusion on Wheels
Hey Guys

I just got the uploadableFile plugin working but it is adding a \ to
the beginning of every file. It is adding the proper name in the
database but the file itself has a \

Example
\6390.gif
I uploaded 6390.gif

My model code is
<cfset uploadableFile(property="filename", destination="/var/www/
images/logos/", accept="#acceptMimeTypes#")>

If I remove the last slash like
<cfset uploadableFile(property="filename", destination="/var/www/
images/logos", accept="#acceptMimeTypes#")>

Then it names the file
logos\6390.gif in the images folder.

Any help would be great.

Howard Fore

unread,
Sep 29, 2011, 11:30:14 PM9/29/11
to cfwh...@googlegroups.com
I think I solved this by replacing \/ to / in the plugin code (I'm on a Mac). You'll need to rezip the changed code or lose the change your next reload.

--
Howard Fore, howar...@hofo.com
"A novice asked the master, 'What is the true meaning of programming?' The master replied: 'Eat when you are hungry, sleep when you are fatigued, program when the moment is right.' " - Geoffrey James - From The Zen of Programming.



--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.


Russ Johnson

unread,
Sep 29, 2011, 11:56:33 PM9/29/11
to cfwh...@googlegroups.com
Heh… I did the same thing last night… the delimiter should just be a single forward slash… CF will only use the first value if you have more than one value in that list…

- Russ

tpet...@gmail.com

unread,
Sep 30, 2011, 9:03:27 AM9/30/11
to ColdFusion on Wheels
bug that. i don't have my mac vm hooked up to webserver yet to test
against.

seems my little plugin is getting very popular lately O_o

On Sep 29, 11:56 pm, Russ Johnson <russ.cfco...@gmail.com> wrote:
> Heh… I did the same thing last night… the delimiter should just be a single forward slash… CF will only use the first value if you have more than one value in that list…
>
> - Russ
>
> On Sep 29, 2011, at 11:30 PM, Howard Fore wrote:
>
>
>
>
>
>
>
> > I think I solved this by replacing \/ to / in the plugin code (I'm on a Mac). You'll need to rezip the changed code or lose the change your next reload.
>
> > --
> > Howard Fore, howard.f...@hofo.com
> > "A novice asked the master, 'What is the true meaning of programming?' The master replied: 'Eat when you are hungry, sleep when you are fatigued, program when the moment is right.' " - Geoffrey James - From The Zen of Programming.
>
> > On Thu, Sep 29, 2011 at 6:39 PM, Cubes <sweetco...@gmail.com> wrote:
> > Hey Guys
>
> > I just got the uploadableFile plugin working but it is adding a \ to
> > the beginning of every file. It is adding the proper name in the
> > database but the file itself has a \
>
> > Example
> > \6390.gif
> >  I uploaded 6390.gif
>
> > My model code is
> > <cfset uploadableFile(property="filename", destination="/var/www/
> > images/logos/", accept="#acceptMimeTypes#")>
>
> > If I remove the last slash like
> > <cfset uploadableFile(property="filename", destination="/var/www/
> > images/logos", accept="#acceptMimeTypes#")>
>
> > Then it names the file
> > logos\6390.gif in the images folder.
>
> > Any help would be great.
>
> > --
> > You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
> > To post to this group, send email to cfwh...@googlegroups.com.
> > To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/cfwheels?hl=en.

Cubes

unread,
Sep 30, 2011, 3:11:56 PM9/30/11
to ColdFusion on Wheels
Thanks everyone for helping me get this working. Works like a champ
now.



On Sep 29, 8:30 pm, Howard Fore <howard.f...@hofo.com> wrote:
> I think I solved this by replacing \/ to / in the plugin code (I'm on a
> Mac). You'll need to rezip the changed code or lose the change your next
> reload.
>
> --
> Howard Fore, howard.f...@hofo.com
> "A novice asked the master, 'What is the true meaning of programming?' The
> master replied: 'Eat when you are hungry, sleep when you are fatigued,
> program when the moment is right.' " - Geoffrey
> James<http://www.softwarequotes.com/showquotes.aspx?id=687&name=James,Geoffrey>-
Reply all
Reply to author
Forward
0 new messages