Search code examples
phpcodeigniterfile-uploadgrocery-crudrar

How can I upload file with 800MB size and rar extension grocery crud


I need to upload a file with rar extension and 800MB size, I add into $config['grocery_crud_file_upload_allow_file_types'] the rar extension, and works but only in files with 3MB.
I change mi php.ini and put upload_max_filesize = 1024M , change $config['grocery_crud_file_upload_max_file_size'] = 1024MB and add in my grocerycrud mimes.php 'rar' => array('application/x-rar-compressed','application/x-rar', 'application/rar', 'application/octet-stream')
I can see the progres bar but when reach 100% I do not see tha name of the file that it always show, or any error. I save but in my database do not save the url. Please help, I need to upload 800MB. Thanks in advance.


Solution

  • Settings For for allowed type:

    $config['allowed_types'] = 'zip|rar';
    

    Replace the mime.php configuration for zip and rar to:

    'zip'  =>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed','application/force-download','application/octet-stream'),
    'rar'  =>  array('application/x-rar', 'application/rar','application/x-rar-compressed','application/force-download','application/octet-stream'),
    

    In your php.ini

    ; Maximum allowed size for uploaded files.
    ; http://php.net/upload-max-filesize
    upload_max_filesize = 1000M
    

    and

    ; Maximum size of POST data that PHP will accept.
    ; http://php.net/post-max-size
    post_max_size = 1000M
    

    and You can also change limits in

    .htaccess file:

    php_value upload_max_filesize 1000M
    php_value post_max_size 1000M
    

    NOTE::

    Please Restart The Server After Edit In .php mime.php .htaccess