fileuploadattribute - Version 1.4.0

Version Notes

- Restricted file extensions are not getting ignored anymore.

Download this release

Release Info

Developer Javier Villanueva
Extension fileuploadattribute
Version 1.4.0
Comparing to
See all releases


Code changes from version 1.3.0 to 1.4.0

app/code/community/Jvs/FileAttribute/.DS_Store DELETED
Binary file
app/code/community/Jvs/FileAttribute/Block/.DS_Store DELETED
Binary file
app/code/community/Jvs/FileAttribute/Helper/.DS_Store DELETED
Binary file
app/code/community/Jvs/FileAttribute/Model/.DS_Store DELETED
Binary file
app/code/community/Jvs/FileAttribute/Model/Attribute/Backend/File.php CHANGED
@@ -58,21 +58,7 @@ class Jvs_FileAttribute_Model_Attribute_Backend_File
58
  $uploader->setAllowRenameFiles(true);
59
  $uploader->setFilesDispersion(true);
60
 
61
- // Make sure to unset the file extension from the main
62
- // protected extension node to allow uploading
63
- $store = Mage::app()->getStore();
64
-
65
- $defaultConfig = Mage::getStoreConfig('general/file/protected_extensions', $store);
66
-
67
- $filteredExtensions = array_diff($defaultConfig, $uploadedFile->getData('allowed_extensions'));
68
-
69
- $store->setConfig('general/file/protected_extensions', $filteredExtensions);
70
-
71
  $uploader->save(Mage::getBaseDir('media') . '/catalog/product');
72
-
73
- // Restore main protected extensions
74
- $store->setConfig('general/file/protected_extensions', $defaultConfig);
75
-
76
  } catch (Exception $e) {
77
  return $this;
78
  }
58
  $uploader->setAllowRenameFiles(true);
59
  $uploader->setFilesDispersion(true);
60
 
 
 
 
 
 
 
 
 
 
 
61
  $uploader->save(Mage::getBaseDir('media') . '/catalog/product');
 
 
 
 
62
  } catch (Exception $e) {
63
  return $this;
64
  }
app/code/community/Jvs/FileAttribute/etc/.DS_Store DELETED
Binary file
package.xml CHANGED
@@ -1,20 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>fileuploadattribute</name>
4
- <version>1.3.0</version>
5
  <stability>stable</stability>
6
- <license uri="https://opensource.org/licenses/MIT">MIT</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Create file upload attributes for your products by adding a new input type to the attribute creation form.</summary>
10
  <description>This extension allows you to create file upload attributes for your products by adding a new input type to the attribute creation form.&#xD;
11
  &#xD;
12
  You will be able to assign multiple file upload attributes to your products, restrict allowed file extensions and choose to display them automatically on your product pages or display it by yourself however you want to.</description>
13
- <notes>Use attribute output helper instead of rewrite</notes>
14
- <authors><author><name>Javier Villanueva</name><user>javiervd</user><email>javiervd@gmail.com</email></author></authors>
15
- <date>2016-04-02</date>
16
- <time>20:12:18</time>
17
- <contents><target name="magecommunity"><dir name="Jvs"><dir name="FileAttribute"><dir name="Block"><dir name="Element"><file name="File.php" hash="3cc11497c90e17d239a56474e13d0b08"/></dir><file name=".DS_Store" hash="ebce7d54cccacf1bd448203eb4bbd561"/></dir><dir name="Helper"><file name="Data.php" hash="a47a857c8cca8551d88da798e52785d5"/><file name=".DS_Store" hash="437544c43163b0c119f0d54b3165090c"/></dir><dir name="Model"><dir name="Attribute"><dir name="Backend"><file name="File.php" hash="eadb7ec113ccb821ad696a5275f72f5f"/></dir></dir><file name="Observer.php" hash="2e5bf7a02e92ac5760ac6820e1c810a0"/><file name=".DS_Store" hash="e6214ab42c38117d470985232dd26489"/></dir><dir name="etc"><file name="config.xml" hash="bbca70ea5022886a43bcf4fc46b7d9ea"/><file name=".DS_Store" hash="c8a94f9995370bbee66fb1e6790a2bcc"/></dir><file name=".DS_Store" hash="d22cbfb00c2760c947b1a31b45181077"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Jvs_FileAttribute.xml" hash="23788d82b953b31264288716e8536ba9"/></dir></target></contents>
18
  <compatible/>
19
- <dependencies><required><php><min>5.3.0</min><max>7.0.4</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>fileuploadattribute</name>
4
+ <version>1.4.0</version>
5
  <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Create file upload attributes for your products by adding a new input type to the attribute creation form.</summary>
10
  <description>This extension allows you to create file upload attributes for your products by adding a new input type to the attribute creation form.&#xD;
11
  &#xD;
12
  You will be able to assign multiple file upload attributes to your products, restrict allowed file extensions and choose to display them automatically on your product pages or display it by yourself however you want to.</description>
13
+ <notes>- Restricted file extensions are not getting ignored anymore.</notes>
14
+ <authors><author><name>Javier Villanueva</name><user>jahvi</user><email>javiervd@gmail.com</email></author></authors>
15
+ <date>2016-06-11</date>
16
+ <time>18:40:21</time>
17
+ <contents><target name="magecommunity"><dir name="Jvs"><dir name="FileAttribute"><dir name="Block"><dir name="Element"><file name="File.php" hash="3cc11497c90e17d239a56474e13d0b08"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a47a857c8cca8551d88da798e52785d5"/></dir><dir name="Model"><dir name="Attribute"><dir name="Backend"><file name="File.php" hash="b91adc1758e024f248938844103f51da"/></dir></dir><file name="Observer.php" hash="2e5bf7a02e92ac5760ac6820e1c810a0"/></dir><dir name="etc"><file name="config.xml" hash="bbca70ea5022886a43bcf4fc46b7d9ea"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Jvs_FileAttribute.xml" hash="23788d82b953b31264288716e8536ba9"/></dir></target></contents>
18
  <compatible/>
19
+ <dependencies><required><php><min>5.3.0</min><max>7.0.8</max></php></required></dependencies>
20
  </package>