I have a Magento online store and have just created a custom module with the extension (Modulecreator). This module comes with a standard admin interface that can handle file downloads. I found out that if you want to show thumbnails, you can use the type of the image field (addField ('myfield', 'image')) instead of the file type field.
But now I have a problem. When I upload files, I save them in a subdirectory called "slides" in the "media" directory. But when I edit the item, the image path for the thumbnail next to the download field is set to the "media" folder. Not my folder, as I set it to 'media / slides /'.
I am using the following code:
$fieldset->addField('filename', 'image', array(
'label' => Mage::helper('slideshow')->__('File'),
'required' => true,
'name' => 'filename',
));
I tried to set the key "path" in the array, but Magento does not receive it. I hate the lack of support for good and easy-to-use Magento documentation ...
Maybe you can help me find a solution?
source
share