-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customization for _getUploadRoot and _getAllowedExtensions in Mage_Adminhtml_Model_System_Config_Backend_File #3933
Conversation
…llowedExtensions ( OpenMage#3933 )
@eneiasramos could you please write a real title and description? thanks! |
Sorry I forgot that my dear 😸 |
@fballiano done my dear! |
@Flyingmana can you help me here? I'm not sure I understand how to test this |
will have a look on the weekend |
Images can use the As for the path I don't follow the changes here. Can you explain some more of what you are trying to do? If you only want to allow a specific file extension I would provide a class that extends |
$dir = str_replace('root_dir', 'base_dir', $matches[1]); | ||
$path = str_replace('/', DS, $matches[2]); | ||
return Mage::getConfig()->getOptions()->getData($dir) . $path; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert the changes in this method(and do it as a separate PullRequest with proper description), they are not covered by the Description and there is no reason visible for me, why this change might be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put it in the comment below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do separate the getUploadRoot change, and provide further explaination why the getAllowedExtensions should be extended in this way and which file formats you actually plan to add (or remove?)
…llowedExtensions ( OpenMage#3933 )
…llowedExtensions ( OpenMage#3933 )
…llowedExtensions ( OpenMage#3933 )
…llowedExtensions ( OpenMage#3933 )
…llowedExtensions ( OpenMage#3933 )
@Flyingmana here: |
…lowedExtensions
Description (*)
Here we have the implementation of 2 functionalities:
1 - Add validation for allowed extensions when uploading files.
today:
new:
2 - Add validation to the config's attribute in upload_dir's tag (not used today). Also the possibility of customizing it. Example:
today:
new:
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)