zsagia/liferay-portal — pull request #18 by lipusz (2014-04-01 23:19:53+00:00)
Title: [TECHNICAL-SUPPORT] LPS-43148 Logo Editor (image_uploader) generates FileExtensionException

Hey Zsaga,

https://issues.liferay.com/browse/LPS-43148

Please, read my commit messages (some of them are multi-line comments) as well.

Regarding lipusz@f4efc72c2a4b16f4a1dcac31a46c0bb27d657fc2, check https://issues.liferay.com/browse/LPS-44746 and https://issues.liferay.com/browse/LPS-44746?focusedCommentId=437096&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-437096.

Render path

1- Usage of liferay-ui:logo-selector
2- logo_selector/page.jsp
3- Creates a new Liferay.LogoSelector instance

4- logo_selector.js: render, bind etc.
5- "Change" action --> logo_selector.js#_openEditLogoWindow --> Renders portlet "image_uploader" (=195) in an iframe
6- UploadImageAction#render --> image_uploader/view.jsp
7- Creates a new Liferay.LogoEditor instance
8- logo_editor.js: render, bind etc.

9- User browses a new file --> logo_editor.js#_onFileNameChange --> _defUploadStartFn --> actionURL hits UploadImageAction#processAction with cmd = "ADD_TEMP" -->

10- UploadImageAction: JSON response containing either an "errorMessage" or the "tempImageFileName"
11- logo_editor.js#_defUploadComplete: add params to the previewURL

12- User clicks on save --> logo_editor#_

Let me know if you have any concerns.

Regads,
Tibor