dongzha0149 2017-05-24 09:43
浏览 75
已采纳

如何上传800MB大小的文件和rar扩展杂货

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.

  • 写回答

1条回答 默认 最新

  • duanchuang3182 2017-05-24 10:05
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥50 大二的web前段开发静态网页纸质版
  • ¥15 robocopy文件复制
  • ¥15 unity安卓打包出现问题
  • ¥15 爱快路由器端口更改错误导致无法访问
  • ¥20 安装catkin时遇到了如下问题请问该如何解决呢
  • ¥15 VAE模型如何输出结果
  • ¥15 编译python程序为pyd文件报错:{"source code string cannot contain null bytes"
  • ¥20 关于#r语言#的问题:广义加行模型拟合曲线后如何求拐点
  • ¥15 fluent设置了自动保存后,会有几个时间点不保存
  • ¥20 激光照射到四象线探测器,通过液晶屏显示X、Y值
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部