留言板

Implement my own Upload

Denis Weigandt,修改在15 年前。

Implement my own Upload

New Member 帖子: 11 加入日期: 08-7-1 最近的帖子
Hi,

i would like to implement my own upload system.

It would be great if I could use the flash uploader by liferay.

So I do:


<% image = null; %>
<c:if test="<%= image == null %>">
<script type="text/javascript">
jQuery(
function() {
new Liferay.Upload({
allowedFileTypes: '<%= StringUtil.merge(PropsValues.IG_IMAGE_EXTENSIONS) %>',
container: '#<portlet:namespace />fileUpload',
fileDescription: '<%= StringUtil.merge(PropsValues.IG_IMAGE_EXTENSIONS) %>',
fallbackContainer: '#<portlet:namespace />fallback',
maxFileSize: <%= PropsValues.IG_IMAGE_MAX_SIZE %>,
namespace: '<portlet:namespace />',
uploadFile: '<liferay-portlet:actionURL windowState="<%= LiferayWindowState.POP_UP.toString() %>" doAsUserId="<%= user.getUserId() %>"><portlet:param name="struts_action" value="/ext/XXXX/assets/image_management/edit_image" /><portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ADD %>" /><portlet:param name="folderId" value="<%= String.valueOf(folderId) %>" /></liferay-portlet:actionURL><liferay-ui:input-permissions-params modelName="<%= IGImage.class.getName() %>" />'
});
}
);
</script>

<div class="lfr-upload-container" id="<portlet:namespace />fileUpload"></div>

<div class="lfr-fallback" id="<portlet:namespace />fallback">
</c:if>

<liferay-ui:upload-progress
id="<%= uploadProgressId %>"
iframeSrc="<%= uploadProgressURL %>"
redirect="<%= redirect %>"
/>

<c:if test="<%= image == null %>">
</div>
</c:if>


The Problem is that my image is uploaded , I see the progress bar running.
But my action /ext/XXXX/assets/image_management/edit_image is never run.
/ext/XXXX/assets/image_management/edit_image was set up as action like it has to be.


Maybe knows someone what I'm doing wrong.

Please help.


BTW: is it poss. that the user can take only one file to upload ?
Dana Oredson,修改在14 年前。

RE: Implement my own Upload

Junior Member 帖子: 70 加入日期: 08-10-14 最近的帖子
Still broken in 5.2.2; The Document Library's EditFileAction is never called when using the flash uploader. In IE (6 or 7), the flash control isn't even displayed. Junk.
thumbnail
Jakub Liska,修改在13 年前。

RE: Implement my own Upload

Regular Member 帖子: 187 加入日期: 10-3-25 最近的帖子
Don't you use flash blocker ? If you do, it just looks like it doesn't work - the flash icon to be clicked on is displayed at the top left corner so that one doesn't notice ...
Cédric Celer,修改在12 年前。

RE: Implement my own Upload

New Member 帖子: 9 加入日期: 11-6-16 最近的帖子
Hi Denis,

Did you find the solution ?

Cédric