daylightstudio / FUEL-CMS

A CodeIgniter Content Management System
http://www.getfuelcms.com
1.01k stars 454 forks source link

Layout multiple file upload fields #55

Open jmcastillo opened 13 years ago

jmcastillo commented 13 years ago

When a layout have two or more file upload fields, only upload the first of them.

daylightstudio commented 13 years ago

Thanks for the report. I'll take a look at that issue probably tonight.

daylightstudio commented 13 years ago

I'm having trouble replicating the issue. For my local testing, I simply added the following to the main layout in the MY_fuel_layouts.php config file:

'test1_image' => array('type' => 'file'),
'test2_image' => array('type' => 'file'),

What else do I need to do to replicate the issue?

jmcastillo commented 13 years ago

Hi, I have this code in MY_fuel_layouts.php config file:

$config['layout_fields']['test_la'] =  array(
'press_pdf' => array('label' => 'Press note', 'type' => 'file', 'accept' => 'pdf', 'description' => 'Accepts pdf files', 'upload_path' => assets_server_path('pdf'), 'class' => 'asset_select pdf'),
'press_kit' => array('label' => 'Press kit', 'type' => 'file', 'accept' => 'zip|rar', 'description' => 'Accepts zip and rar files', 'upload_path' => assets_server_path('press_kit'), 'class' => 'asset_select press_kit')
);

the directories have 777 permissions (pdf and press_kit) under assets directory.

daylightstudio commented 13 years ago

Hmm... I'm still having trouble replicating the issue. I was able to upload 2 files locally at the same time to 2 different directories. Could the issue possibly be with the file size you are trying to upload and perhaps the server is limiting that?