Answers.Body: <p>No, it does not support tar.gz files -- it only supports zip files.</p>
  
  <p>The relevant logic is in <a href="https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Extension/Downloader.php" rel="nofollow">CRM_Extension_Downloader</a>. Note that <code>checkRequirements()</code> and <code>extractFiles()</code> are written to use PHP's <a href="http://php.net/manual/en/class.ziparchive.php" rel="nofollow">ZipArchive</a>.</p>
  
  <p><strong>Update</strong>: Another tip. You may want to test that a given file can be downloaded+extracted correctly, but that usually requires publishing a new release (which means that you have publish something untested... oops). To test the download+extract steps <em>before</em> publishing the release, you can do something like this:</p>
  
  <ul>
  <li>Create the zip file and determine its URL.</li>
  <li>Run <code>drush cvapi extension.download key=org.example.myext url=http://example.org/myext-test.zip</code></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-10T17:20:21.563Z
Answers.Text: @Coleman based on the fact that extensions are nodes on the Civi site: https://www.drupal.org/project/rfv should work.
Answers.UserDisplayName: HomoTechsual
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-16T07:13:46.187Z
Answers.Text: Thanks for the quick answer - we will change our existing extensions. It may make a lot of sense though to limit the file formats you can upload on the "submit an extension page" to *.zip files.
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-16T14:57:06.547Z
Answers.Text: There's no file upload there, just a textfield for a link to your own file. Potentially we could use regex on the link to ensure it ends with .zip? Maybe there's a module for that?
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-15T14:41:40.163Z
Answers.LastActivityDate: 2015-06-15T15:12:48.077Z
Answers.LastEditDate: 2015-06-15T15:12:48.077Z
Answers.UserDisplayName: Tim Otten
Body: <p>We have a couple of extensions (e.g. CiviSEPA) that are approved for automated distribution. This means, users should be able to download and install the extension from the CiviCRM menu.</p>
  
  <p>We uploaded the extensions as *.tar.gz files - which works fine if we install the extension manually.However, CiviCRM seems to expect *.zip files when installing from the menu - users reported an error (see screenshot).</p>
  
  <p><strong>Hence my question: Can CiviCRM's automated distribution handle *.tar.gz files? And/or is anyone familiar with the error message?</strong></p>
  
  <p>--> If it can't, it should probably not be possible to upload *.tar.gz files.!</p>
  
  <p>PS: I am aware that we could create a git tag and let the autoreleaser script on civicrm.org do its thing - however this is currently not an option.</p>
  
  <p><img src="https://i.sstatic.net/c8BCR.png" alt="error message"></p>
  
Tags: <extension>
Title: Can CiviCRM handle Extensions in tar.gz format (automated distribution)
ThreadText: # Can CiviCRM handle Extensions in tar.gz format (automated distribution)
  
  (Asked by: username_0 on 2015-06-15)
  
  We have a couple of extensions (e.g. CiviSEPA) that are approved for automated distribution. This means, users should be able to download and install the extension from the CiviCRM menu.
  
  We uploaded the extensions as \*.tar.gz files - which works fine if we install the extension manually.However, CiviCRM seems to expect \*.zip files when installing from the menu - users reported an error (see screenshot).
  
  **Hence my question: Can CiviCRM's automated distribution handle \*.tar.gz files? And/or is anyone familiar with the error message?**
  
  --> If it can't, it should probably not be possible to upload \*.tar.gz files.!
  
  PS: I am aware that we could create a git tag and let the autoreleaser script on civicrm.org do its thing - however this is currently not an option.
  
  ![error message](https://i.sstatic.net/c8BCR.png)
  
  **Tags:** extension
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-06-15. Score: 5 | Accepted answer
  
  No, it does not support tar.gz files -- it only supports zip files.
  
  The relevant logic is in [CRM\_Extension\_Downloader](https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Extension/Downloader.php). Note that `checkRequirements()` and `extractFiles()` are written to use PHP's [ZipArchive](http://php.net/manual/en/class.ziparchive.php).
  
  **Update**: Another tip. You may want to test that a given file can be downloaded+extracted correctly, but that usually requires publishing a new release (which means that you have publish something untested... oops). To test the download+extract steps *before* publishing the release, you can do something like this:
  
  * Create the zip file and determine its URL.
  * Run `drush cvapi extension.download key=org.example.myext url=http://example.org/myext-test.zip`
  
  > **Comments:**
  > **username_0**: Thanks for the quick answer - we will change our existing extensions. It may make a lot of sense though to limit the file formats you can upload on the "submit an extension page" to *.zip files.  
  > **username_3**: There's no file upload there, just a textfield for a link to your own file. Potentially we could use regex on the link to ensure it ends with .zip? Maybe there's a module for that?  
  > **username_2**: @username_3 based on the fact that extensions are nodes on the Civi site: https://www.drupal.org/project/rfv should work.  
  
  ---
  
  