File tree Expand file tree Collapse file tree 9 files changed +1683
-456
lines changed
design/adminhtml/default/default/layout Expand file tree Collapse file tree 9 files changed +1683
-456
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ public function validateUploadFile($filePath)
637
637
}
638
638
639
639
if ($ imageInfo [0 ] > $ maxDimension || $ imageInfo [1 ] > $ maxDimension ) {
640
- Mage::throwException ($ this ->__ ('Disalollowed file format. ' ));
640
+ Mage::throwException ($ this ->__ ('Disallowed file format. ' ));
641
641
}
642
642
643
643
$ _processor = new Varien_Image ($ filePath );
Original file line number Diff line number Diff line change @@ -103,14 +103,23 @@ class Mage_Uploader_Model_Config_Uploader extends Mage_Uploader_Model_Config_Abs
103
103
*/
104
104
protected function _construct ()
105
105
{
106
+ // Fix error where setting post_max_size or upload_max_filesize to 0
107
+ // causes the flow.js to make infinite chunks and crash the browser
108
+ $ maxSize = $ this ->_getHelper ()->getDataMaxSizeInBytes ();
109
+
110
+ if ($ maxSize === 0 ) {
111
+ $ maxSize = PHP_INT_MAX ;
112
+ }
113
+
106
114
$ this
107
- ->setChunkSize ($ this -> _getHelper ()-> getDataMaxSizeInBytes () )
115
+ ->setChunkSize ($ maxSize )
108
116
->setWithCredentials (false )
109
117
->setForceChunkSize (false )
110
118
->setQuery (array (
111
119
'form_key ' => Mage::getSingleton ('core/session ' )->getFormKey ()
112
120
))
113
121
->setMethod (self ::UPLOAD_TYPE )
122
+ ->setSimultaneousUploads (1 )
114
123
->setAllowDuplicateUploads (true )
115
124
->setPrioritizeFirstAndLastChunk (false )
116
125
->setTestChunks (self ::TEST_CHUNKS )
Original file line number Diff line number Diff line change @@ -158,8 +158,6 @@ Layout for editor element
158
158
<action method =" addJs" ><script >mage/adminhtml/variables.js</script ></action >
159
159
<action method =" addJs" ><script >mage/adminhtml/wysiwyg/widget.js</script ></action >
160
160
<action method =" addJs" ><name >lib/uploader/flow.min.js</name ></action >
161
- <action method =" addJs" ><name >lib/uploader/fusty-flow.js</name ></action >
162
- <action method =" addJs" ><name >lib/uploader/fusty-flow-factory.js</name ></action >
163
161
<action method =" addJs" ><name >mage/adminhtml/uploader/instance.js</name ></action >
164
162
<action method =" addJs" ><script >mage/adminhtml/browser.js</script ></action >
165
163
<action method =" addJs" ><script >prototype/window.js</script ></action >
Original file line number Diff line number Diff line change 258
258
"Details","Details"
259
259
"Disabled","Disabled"
260
260
"Disallowed file type.","Disallowed file type."
261
- "Disalollowed file format.","Disalollowed file format."
261
+ "Disallowed file format.","Disallowed file format."
262
262
"Display Actual Price","Display Actual Price"
263
263
"Display Page Control","Display Page Control"
264
264
"Display Price Interval as One Price","Display Price Interval as One Price"
You can’t perform that action at this time.
0 commit comments