Forums

multi upload files type validation

ameer_alkateeb 06 Sep, 2013
hi

I am trying to use multi upload files type I have two question:
1- I want to upload 10 files each file max 5M is this possible ?
2- how can I add the file type validation

many thanks
Ameer
ameer_alkateeb 04 Oct, 2013
Thank for your reply

but I still can't add a validation
can u write the steps for me

also it not appear on email😟

also when I try to print $form->data['_PLUGINS_']['upload_files'] array
it don't show any thing
I tried to print $_FILES the array appear


please advice
GreyHead 04 Oct, 2013
Hi Ameer,

I suggest that you start with a single file upload as shown in the video in this FAQ. It shows you how to add validation.

Bob
ameer_alkateeb 24 Oct, 2013
thanks again for your reply

it's not working (upload widget)

but I still need your help 🙄

when I sent a big attached the email is not working

how can I send attached as a links to download ?
also how can I save it in Database?
GreyHead 25 Oct, 2013
Hi Ameer,

How big is 'big'?

There are limits on the size of uploads set in the site php.ini file; and there are limits on the size of attachments in most mail systems.

Bob
ameer_alkateeb 25 Oct, 2013
THanks again for your reply

it upload the file.. but the mail provider is not allow this attached size😟

so I want to send attach as a link to be download and I want to save the data in the database .. is this possible ??
GreyHead 25 Oct, 2013
Hi Ameer,

You can certainly send a link in the email and you can save the filename, URL, etc. in the database. It's possible that you could save the file itself in the database but I don't know how to do that.

Bob
ameer_alkateeb 26 Oct, 2013
how can send the links in email ?? and how can I save it in database ???

please please please tell me (I don't want to save the files in database)


many thanks for your answers🙂
GreyHead 26 Oct, 2013
Hi Ameer,

If you add a Debugger action to your form you will see that ChronoForms creates a URL in the $form->data array. It will be something like this:
$form->data['_PLUGINS_']['upload_files']['input_name']['link'];


If you want to save this to the column 'file_url' then add a Custom Code action before the DB Save and Email actions and put code like this in it:
<?php
$form->data['file_url'] = $form->data['_PLUGINS_']['upload_files']['input_name']['link'];
?>

You can then also use {file_url} in the Email template to build a link.

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