CodeIgniter Forums
Uploading .ISO files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Uploading .ISO files (/thread-58499.html)



Uploading .ISO files - El Forum - 06-17-2013

[eluser]vonshavingcream[/eluser]
I have an uploadloader form working with the upload library. All is working except I can't get .iso files to upload.

I keep getting 'The filetype you are attempting to upload is not allowed.'

I updated the mimes.php file to include

Code:
$mimes = array( 'hqx' => 'application/mac-binhex40',
       'iso' =>  array('application/iso-image','application/octet-stream'),
    'cpt' => 'application/mac-compactpro', ...

But I still get the same error. It is not a file size issue, if I compress the iso into a .zip wrapper the file uploads with no issues.

Thanks in advance.

Chris


Uploading .ISO files - El Forum - 06-18-2013

[eluser]Pert[/eluser]
Are you using this?
http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html

If so, then it looks like it's the configuration that handles what files can be uploaded
Code:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '100';
$config['max_width']  = '1024';
$config['max_height']  = '768';

$this->load->library('upload', $config);

Maybe try changing <b>$config['allowed_types']</b> to see if that helps?


Uploading .ISO files - El Forum - 06-18-2013

[eluser]vonshavingcream[/eluser]
yeah I already have that set with the iso in the string

Code:
$this->upload_config = array(
            'upload_path'   => $image_upload_folder,
            'allowed_types' => 'png|jpg|jpeg|bmp|tiff|zip|sit|pdf|iso',
            'max_size'      => 0,
            'remove_space'  => TRUE,
            'encrypt_name'  => TRUE,);



Uploading .ISO files - El Forum - 06-18-2013

[eluser]Pert[/eluser]
What about file size then?

If you rename same file to .zip and try to upload it, if it fails then it might indicate file size issue. Or if you try to upload mock-up .iso file that is tiny.


Uploading .ISO files - El Forum - 06-18-2013

[eluser]vonshavingcream[/eluser]
I have done the following in testing and trying to correct this issue.

1. I am able to upload 4GB .zip files with no problem.
2. change extension from .iso to .zip - Fails with error.
3. compress .iso to .zip - Successful Upload.
4. change extension of .zip file to .iso - Fails with error.
5. uploaded 400k .zip file - Success .. rename 400k zip file to .iso .. Fails with error.

Most of the files I am testing with are between 1 and 4 GB. Our server is set to handle up to 6GB which it does correctly. I tried the smaller file at your suggestion with the same results.


Uploading .ISO files - El Forum - 06-18-2013

[eluser]Pert[/eluser]
http://php.net/manual/en/features.file-upload.errors.php

Can you echo out $_FILES array to see if there were any errors after upload?