Forums

File does not upload if there is a space in the path

redrings 14 Oct, 2008
Hello,

I found a problem today with people uploading files on our forms. That problem is that if they have any spaces in their local file path the file will not upload. For example, the following file will not upload:

C:\Documents and Settings\Trisha\My Documents\My Pictures\2008-10\tetris.jpg (spaces in My Documents and My Pictures)

But the following would work:

C:\Users\Trisha\Pictures\tetris.jpg (no spaces)

Is there any way to fix this?

Thanks!
GreyHead 14 Oct, 2008
Hi redring,

I just built a test form in v3.0 stable with just a file upload and it appears to work OK - uploaded the following file without a hitch

C:\Documents and Settings\Bob\Desktop\test_doc.pdf

I'm running on local WAMP.

Bob
redrings 14 Oct, 2008
Thanks Bob,

I'll try it out on my XAMPP localhost and see what happens. I'm having the problem on 2 different production sites (site5 is the host for both). Would you happen to know if a server or php setting could cause this problem?

Thanks!
Robert
GreyHead 14 Oct, 2008
Hi Robert,

No server setting that I know if - but that doesn't say much. Linux servers sometime a have problems with spaces - but only in the file-name and remote path in my (limited) experience, not in the local path.

Bob
Max_admin 14 Oct, 2008
Hi redrings,

I'm not aware of this too and never faced it, you may try a quick google search or just ask your host admin, these odd issues are mostly extra security settings done by host admins!

Cheers,

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
dbirchmier 20 Oct, 2008
Hey guys,

I've actually got the exact same issue, and hopefully can shed some additional light...


First off, the previous posters are correct -- the upload via email option FAILS when the path to the file contains spaces. Some may not see this issue because it ONLY fails in IE -- It works perfectly fine in Firefox!

Does anyone have any ideas as to how to fix this problem?
Max_admin 20 Oct, 2008
Hi dbirchmier,

do you have the
enctype="multipart/form-data"
in the form tag attachment ?

Cheers,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
redrings 21 Oct, 2008
[quote="admin"]Hi dbirchmier,

do you have the
enctype="multipart/form-data"
in the form tag attachment ?

Cheers,
Max[/quote]

Max,

Thanks! I hadn't made any progress on finding out what was causing this, but after i saw your reply to dbirchmier I went into my forms and saw that the form tag attachment field was empty. After adding [code]enctype="multipart/form-data"[/code] to that my initial testing confirms that uploads with spaces are working (I've only done one test, with the IE8 beta from work - but I'll do some more testing from IE7 and IE6 when I get home tonight).

Thanks again!
Max_admin 21 Oct, 2008
No problems, it will fix it, this is a recent discovered issue, earlier this was a must to do but at V3.0 I added some way to add this tag automatically but this method is failing sometimes, will fix it in the next release!

Cheers,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
dbirchmier 04 Nov, 2008

Hi dbirchmier,

do you have the

enctype="multipart/form-data"
in the form tag attachment ?

Cheers,
Max



Wow, you answered my question 50 minutes after I asked it...yet I am taking 2 weeks to respond😟

Thanks for your incredibly fast response. I am not sure where I need to put this code, though.

Here is what the code for my form looks like...

<div class="form_item"><div class="form_element cf_heading"><h1 id="" class="cf_text">Upload your work!</h1></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_text"><span class="cf_text">Send us a picture of what you have done recently to earn points. We'll review it, credit your account & add your accomplishment to our gallery for the masses to view! Remember, points = free stuff!</span></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_fileupload"><label class="cf_label">Upload Picture:</label><input class="cf_inputbox" size="20" id="file_0" name="file_0" type="file"></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_textarea"><label class="cf_label">Tell us what you did:</label><textarea class="cf_inputbox required" rows="3" id="text_5" cols="30" name="text_5"></textarea></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_button"><input value="Submit" name="undefined" type="submit"></div><div class="clear"> </div></div>

<div class="form_item"><div class="form_element cf_hidden"><label class="cf_label"></label>
<input value="{username}" id="hidden_22" name="username" type="hidden"></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_hidden"><label class="cf_label"></label>
<input value="{email}" id="hidden_21" name="email" type="hidden"></div><div class="clear"> </div></div><div class="form_item"><div class="form_element cf_hidden"><label class="cf_label"></label>
<input value="{name}" id="hidden_20" name="name" type="hidden"></div><div class="clear"> </div></div>



Thanks again for the help!
redrings 04 Nov, 2008
It goes on the General Tab (not the form code tab), it is the third entry down:

Form tag attachment:
something like onSubmit()

dbirchmier 04 Nov, 2008
nevermind! not sure what I was thinking.

It's under the general tab🙂

Thanks for the help!
dbirchmier 04 Nov, 2008

It goes on the General Tab (not the form code tab), it is the third entry down:

Form tag attachment:
something like onSubmit()


haha, yep. Thanks🙂

I just figured it out.

Everyone here is so helpful. Unbelievable component!
This topic is locked and no more replies can be posted.