Comments (6)
this is uploadfile of the extension
/**
* Upload and resize new file
*
* @param string $targetPath Target directory
* @param string $type Type of storage, e.g. image, media etc.
* @throws Mage_Core_Exception
* @return array File info Array
*/
public function uploadFile($targetPath, $type = null)
{
$uploader = new Mage_Core_Model_File_Uploader('image');
if ($allowed = $this->getAllowedExtensions($type)) {
$uploader->setAllowedExtensions($allowed);
}
$uploader->setAllowRenameFiles(true);
$uploader->setFilesDispersion(false);
$result = $uploader->save($targetPath);
if (!$result) {
Mage::throwException( Mage::helper('cms')->__('Cannot upload file.') );
}
// create thumbnail
if ($this->getUploadType() == 'image') {
$this->resizeFile($targetPath . DS . $uploader->getUploadedFileName(), true);
}
$result['cookie'] = array(
'name' => session_name(),
'value' => $this->getSession()->getSessionId(),
'lifetime' => $this->getSession()->getCookieLifetime(),
'path' => $this->getSession()->getCookiePath(),
'domain' => $this->getSession()->getCookieDomain()
);
return $result;
}
from magento-lts.
maybe getSession() to _getSession()?
from magento-lts.
maybe getSession() to _getSession()?
That would depends on the parent classes. But this should work:
$session = Mage::getSingleton('core/session');
$result['cookie'] = array(
'name' => session_name(),
'value' => $session->getSessionId(),
'lifetime' => $session->getCookieLifetime(),
'path' => $session->getCookiePath(),
'domain' => $session->getCookieDomain()
);
from magento-lts.
Not resolve because the problem is before.
NWD revolution slider extend Mage_Cms_Model_Wysiwyg_Images_Storage to create a custom uploader and maybe something is changed in session for 20.1.1
Maybe something in javascript
I think media storage can have a custom menu like media library of wordpress.
Maybe someone can resolve this problem with a paid work?
from magento-lts.
I have created a new category in Discussions for those interested in solving their problems quickly by paying a developer
https://github.com/OpenMage/magento-lts/discussions/categories/hire
from magento-lts.
submitted
from magento-lts.
Related Issues (20)
- Quote product prices rounding issues when catalog prices include taxes
- Upload gif image on backend system Configuration Issue HOT 2
- support smtp servers out of the box HOT 12
- In backend, add "click to copy text" feature HOT 1
- SOAP fault due to "SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/' " HOT 25
- SOAP API: SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema HOT 4
- Shopping Cart Price rule - Free Shipping weight condition
- feature request: Event for configuration actions (save/delete) on path HOT 2
- Admin filters and sorting not working after upgrader to v20.6.0 and v20.7.0 HOT 1
- Edit attributes broken? HOT 4
- Black background of PNG images with transparent background in the Wysiwyg editor HOT 11
- Skipped Zend_Validate_Barcode_Intelligentmail from autoloading HOT 1
- Improving the file name generation logic for JS and CSS files HOT 7
- After upgrade to v20.7.0 I got some alert on Admin Login HOT 16
- Fatal error after upgrading from 20.1.1 to 20.8 when clearing cache from Admin Page HOT 2
- Error when saving product with image without description HOT 6
- Problem with Configurable Swatches after PR #3686 HOT 1
- Unable to Override GroupController in OpenMage HOT 2
- N98-magerun tests fails since #2993 HOT 2
- Current category cache issue in navigation block
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento-lts.