mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-850 (Import is not working)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@54997 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -67,6 +67,7 @@ public class ImportPost extends DeclarativeWebScript
|
||||
protected static final String MULTIPART_FORMDATA = "multipart/form-data";
|
||||
protected static final String PARAM_DESTINATION = "destination";
|
||||
protected static final String PARAM_ARCHIVE = "archive";
|
||||
protected static final String PARAM_FILEDATA = "filedata";
|
||||
protected static final String TEMP_FILE_PREFIX = "import_";
|
||||
|
||||
protected NodeService nodeService;
|
||||
@@ -201,10 +202,14 @@ public class ImportPost extends DeclarativeWebScript
|
||||
// create a temporary file representing uploaded ACP file
|
||||
FormField acpContent = webScriptServletRequest.getFileField(PARAM_ARCHIVE);
|
||||
if (acpContent == null)
|
||||
{
|
||||
acpContent = webScriptServletRequest.getFileField(PARAM_FILEDATA);
|
||||
if (acpContent == null)
|
||||
{
|
||||
throw new WebScriptException(Status.STATUS_BAD_REQUEST,
|
||||
"Mandatory 'archive' file content was not provided in form data");
|
||||
}
|
||||
}
|
||||
|
||||
acpFile = TempFileProvider.createTempFile(TEMP_FILE_PREFIX, "." + ACPExportPackageHandler.ACP_EXTENSION);
|
||||
|
||||
|
Reference in New Issue
Block a user