META-INF.resources.wiki.edit_page_attachment.jsp Maven / Gradle / Ivy
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/wiki/init.jsp" %>
<%
WikiNode node = (WikiNode)request.getAttribute(WikiWebKeys.WIKI_NODE);
WikiPage wikiPage = (WikiPage)request.getAttribute(WikiWebKeys.WIKI_PAGE);
DLConfiguration dlConfiguration = ConfigurationProviderUtil.getSystemConfiguration(DLConfiguration.class);
%>
<%
String acceptedExtensions = StringUtil.merge(dlConfiguration.fileExtensions(), StringPool.COMMA_AND_SPACE);
%>
'<%= acceptedExtensions %>'
'<%= acceptedExtensions %>'
'<%= acceptedExtensions %>'
var uploader = new Liferay.Upload({
boundingBox: '# fileUpload',
<%
DecimalFormatSymbols decimalFormatSymbols = DecimalFormatSymbols.getInstance(locale);
%>
decimalSeparator: '<%= decimalFormatSymbols.getDecimalSeparator() %>',
deleteFile: '<%= deleteURL.toString() %>',
fallback: '# fallback',
fileDescription:
'<%= StringUtil.merge(dlConfiguration.fileExtensions()) %>',
maxFileSize:
'<%= DLValidatorUtil.getMaxAllowableSize(themeDisplay.getScopeGroupId(), null) %> ',
namespace: ' ',
rootElement: '# uploaderContainer',
tempFileURL: {
method: Liferay.Service.bind('/wiki.wikipage/get-temp-file-names'),
params: {
nodeId: <%= node.getNodeId() %>,
folderName: '<%= WikiConstants.TEMP_FOLDER_NAME %>',
},
},
tempRandomSuffix: '<%= TempFileEntryUtil.TEMP_RANDOM_SUFFIX %>',
uploadFile:
' ',
});