Title: Batch Upload
Last modified: October 21, 2016

---

# Batch Upload

 *  Resolved [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/)
 * Hi,
 * I’m trying to do a batch upload on memphis doc and i’m getting the following 
   error :
 * Memphis Error:
    Please upload a zip file.
 * Output:
 * name ==> testfile.zip
    type ==> application/octet-stream tmp_name ==> /tmp/phpG79bjI
   error ==> 0 size ==> 5727179
 * Server compatibility show every box with a green checkbox and no special comments.
 * Thanks in advance for the help.

Viewing 15 replies - 1 through 15 (of 40 total)

1 [2](https://wordpress.org/support/topic/batch-upload-3/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/batch-upload-3/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/batch-upload-3/page/2/?output_format=md)

 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8338787)
 * Make sure all these settings are correct as well:
    - Check upload_tmp_dir in php.ini. This is directory where PHP stores temporary
      files while uploading.
    - Check open_basedir in php.ini. If defined it limits PHP read/write rights 
      to specified path and its subdirectories. Ensure that upload_tmp_dir is inside
      this path.
    - Check post_max_size in php.ini. If you want to upload 20 Mbyte files, try 
      something a little bigger, like post_max_size = 21M. This defines largest 
      size of POST message which you are probably using during upload.
    - Check upload_max_filesize in php.ini. This specifies biggest file that can
      be uploaded.
    - Check memory_limit in php.ini. That’s the maximum amount of memory a script
      may consume. It’s quite obvious that it can’t be lower than upload size (to
      be honest I’m not quite sure about it-PHP is probably buffering while copying
      temporary files).
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8338860)
 * upload_max_filesize = 100M
    post_max_size = 100M memory_limit = 512M
 * upload_tmp_dir and open_basedir I have no control upon since i’m in a cpanel 
   environment.
 * The file i’m trying to upload is 5mb
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8338879)
 * if you want to do a test you can try this, open the file mdocs-batch-upload.php
   and change starting at line 10:
 *     ```
       if(isset($_FILES['mdocs-batch']) && strpos($_FILES['mdocs-batch']['type'],'zip') == false) {
       		$string = '<h5>'.__('Please upload a zip file.','mdocs').'</h5>';
       		$string .= '<h6>'.__('Output:','mdocs').'</h6>';
       		foreach($_FILES['mdocs-batch'] as $index => $value) $string .=  $index.' ==> '.$value.'<br>';
       		$string .= '</p>';
       		mdocs_errors($string, 'error');
       	} elseif(isset($_FILES['mdocs-batch']) && strpos($_FILES['mdocs-batch']['type'],'zip') >= 0) {
       		if(!file_exists(sys_get_temp_dir().'/mdocs/')) mkdir(sys_get_temp_dir().'/mdocs/');
       		$zip_result = mdocs_unzip($_FILES['mdocs-batch']['tmp_name'], sys_get_temp_dir());
       		$do_zip = true;
       	} elseif (isset($_POST['mdocs-batch-complete'])) {
       		$do_complte = true;
       	}
       ```
   
 * to this:
 *     ```
       	/*
       	if(isset($_FILES['mdocs-batch']) && strpos($_FILES['mdocs-batch']['type'],'zip') == false) {
       		$string = '<h5>'.__('Please upload a zip file.','mdocs').'</h5>';
       		$string .= '<h6>'.__('Output:','mdocs').'</h6>';
       		foreach($_FILES['mdocs-batch'] as $index => $value) $string .=  $index.' ==> '.$value.'<br>';
       		$string .= '</p>';
       		mdocs_errors($string, 'error');
       	} elseif(isset($_FILES['mdocs-batch']) && strpos($_FILES['mdocs-batch']['type'],'zip') >= 0) {
       		if(!file_exists(sys_get_temp_dir().'/mdocs/')) mkdir(sys_get_temp_dir().'/mdocs/');
       		$zip_result = mdocs_unzip($_FILES['mdocs-batch']['tmp_name'], sys_get_temp_dir());
       		$do_zip = true;
       	} elseif (isset($_POST['mdocs-batch-complete'])) {
       		$do_complte = true;
       	}
       	*/
       	if(!file_exists(sys_get_temp_dir().'/mdocs/')) mkdir(sys_get_temp_dir().'/mdocs/');
       	$zip_result = mdocs_unzip($_FILES['mdocs-batch']['tmp_name'], sys_get_temp_dir());
       	$do_zip = true;
       ```
   
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8338992)
 * Tried it. It created an empty folder in the /tmp.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339012)
 * I think your problem is this application/octet-stream. Your server does not recognize
   zip files.
 * The MIME types “text/plain” and “application/octet-stream” are termed ambiguous
   because they generally do not provide clear indications of which application 
   or CLSID should be associated as the content handler…
 * …and defaulting to the final determined MIME type of “application/octet-stream.”
   Other types of files, such as .reg files, behave similarly.
 * What type of server are you running? Windows or Linux?
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339025)
 * I’m on centos 6 x64 server hosted on iWeb. I have WHM and CPanel installed. I
   have full control on the server.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339040)
 * Consider adding the following lines to your apache configuration file:
 * AddType application/zip zip
    AddType application/zip ZIP
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339063)
 * Actually just did a test and this is an issue with Chrome. I cannot reproduce
   this with Internet Explorer which seems to upload the files properly.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339077)
 * ill test with chrome right now see if a get the same results.
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339082)
 * Also I have this in chrome after uploading files :
 * ![](https://rbrbtq-dm2305.files.1drv.com/y3m_h82dWK3aPVHCVdCcSZlSZDa_2OaS84LQZWgSycRiepXCEAONMJhKBDMkGB2RvI0UnlI3jB5wedi0iOjb4k5_NhzC5gYisD-
   sUSpMj0m5pwTvUrzIKzhw7fxH7ovXmPw9N-VoKyci7vzDFyrU3dYoumeIr6_ih9IMSo9booidaU?width
   =1024&height=693&cropmode=none)
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339084)
 * just tested with chrome version Version 53.0.2785.143 (64-bit) on a mac no issue
   🙁
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339102)
 * does the screenshot happened everytime you upload a single file or is this using
   the batch process
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339108)
 * it’s directly when I click on memphis docs in the left menu. It’s every time.
 * For the other error the problem does not seem to happen on mac :
 * [http://stackoverflow.com/questions/856013/mime-type-for-zip-file-in-google-chrome](http://stackoverflow.com/questions/856013/mime-type-for-zip-file-in-google-chrome)
 * Look at the answer of this post on stack overflow.
 * Also tried to disable my extensions in chrome but it’s still happening.
    -  This reply was modified 9 years, 7 months ago by [Hyrules](https://wordpress.org/support/users/hyrules/).
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339515)
 * Yes I can reproduce the batch file upload error with chrome for windows, chrome
   on mac works fine….
 * as for the second issue still looking into it.
 *  Thread Starter [Hyrules](https://wordpress.org/support/users/hyrules/)
 * (@hyrules)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/batch-upload-3/#post-8339520)
 * Perfect. If you need anything tested just let me know. Thanks.

Viewing 15 replies - 1 through 15 (of 40 total)

1 [2](https://wordpress.org/support/topic/batch-upload-3/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/batch-upload-3/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/batch-upload-3/page/2/?output_format=md)

The topic ‘Batch Upload’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memphis-documents-library_91918f.
   svg)
 * [Memphis Documents Library](https://wordpress.org/plugins/memphis-documents-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memphis-documents-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memphis-documents-library/)
 * [Active Topics](https://wordpress.org/support/plugin/memphis-documents-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memphis-documents-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memphis-documents-library/reviews/)

 * 40 replies
 * 2 participants
 * Last reply from: [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/batch-upload-3/page/3/#post-8469059)
 * Status: resolved