File uploads issues

sofia 18 Mar, 2008
Hello again Bob,

I'm using file upload in more than one form, regarding which, i have some doubts:

CASE 1
The files are being sent by mail, as attachment, and stored in components/com_chronocontact/upload

Can i avoid this for this form only? I have several forms running in the same site, so i don't want to hack any chrono files.

This is increasing the disk spaced used, and i have to remember to go there now and then and delete the files in the folder. I just need them in my mail.



CASE 2
In other form, i ask people to upload 5 files and give a description to each one of them. The fields were named attach1, attach2 .... and description1, description2 ....

In the email template i have inserted:

{attach1}{description1}
{attach2}{description2} ...


hoping that {attach1} would be replaced by the file name so i could identify which description matched which file. But no luck.

Is there any way i can pull up to the email template the upload file name for each attach field?

Thanks,

Sofia
Max_admin 18 Mar, 2008
Hi Sofia,

For case1: Sorry but in order for files to be sent, it must be stored on server😟, we will try to add some feature to delete them but not yet done!

for case2: this will be tricky, replace {attach1} in the template code with this code :

<?php echo $_FILES['attach1']['name']; ?>

it will work🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 18 Mar, 2008
Hi Sofia,

I think that you could add some code in the 'OnSubmit after email' box to delete the current files. This is a bit risky as you've lost them if anything goes wrong with the email.

A cron job of some kind to clear out old files every week or two might be better.

Bob
This topic is locked and no more replies can be posted.