Forums

[SOLVED] File uploads not working

dmontpe 20 Jun, 2011
Hi. I am using V4 on Joomla 1.6 and have run into trouble with file uploads.

I have one upload files event for 3 upload fields (I only need one, right?) using the default directory, which I have created manually, but when I submit the form I get the following message:

Couldn't create upload directroy 2

What puzzles me the most is that number 2. Why is it trying to create a second directory if I only have one event with one folder?

Any clues will be appreciated.
dmontpe 22 Jun, 2011
Nobody?

I guess this won't help figuring out what's wrong, but I'll add that I placed a debugger after the files upload and it provides no useful info. It only reports that the captha check was ok.

Please, if anyone can even try to guess what's wrong with my setup and how I can fix it, I will appreciate it.
jdcarry82 22 Jun, 2011
Hi,
I think I have the same problem as dmontspe, except that I am new to this and I have no idea where to look for an answer. My boss is making me learn all this new stuff, and I'm afraid he will fire me if I tell him I/m not able to do it. Any advice on how to improve/solve the file uploads problem?
GreyHead 22 Jun, 2011
Hi jdcarry82,

Exactly what problem do you have?

Are you using ChronoForms v4?

Please post a link to the form so we can take a quick look.

Bob
dmontpe 22 Jun, 2011
Well, I didn't exactly fix it, but got my form to work. Searching the forum I found reference to Greyhead's upload files action found at http://greyhead.net/how-to-docs/cfv4-upload-files-gh-action.

At first it didn't upload either but just due to a permissions error. I had to give ownership of the directory to the Joomla user. Fixed that with chown and got it working.

Thanks to Greyhead for developing the action. I still don't know why the default one doesn't work.

I still have one question, though: what's the right syntaxis to have the files renamed so they include the content of another field in the form? I would like it to rename the file to either [some-other-field's-content]_[input-name] or [timestamp]_[input-name]. Could anyone tell me how to do that?
GreyHead 22 Jun, 2011
Hi dmontpe,

If you are using my File Upload action then - if I remember correctly* you should be able to put {some_other_field's_name}_{file_input_name} or {datetime}_{file_input-name}

Bob

* I see I forgot to document this on the Help tab but I think it has the same options as the file path
dmontpe 22 Jun, 2011
Thanks, Greyhead. I was starting to feel jealous that my post had been sitting there for 2 days and then you replied to jdcarry and not me. :wink:

Anyway, it was my bad. I was trying to find a way to do the renaming with a single upload action, which wouldn't work, obviously. So now I've set 3 different actions and got what I wanted. Thanks.
This topic is locked and no more replies can be posted.