mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
119504 jkaabimofrad: RA-637, SFS-260: Added multipart upload REST API. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126357 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -50,7 +50,7 @@ public class MultiPartBuilder
|
||||
private String contentTypeQNameStr;
|
||||
private List<String> aspects;
|
||||
private boolean majorVersion;
|
||||
private boolean overwrite = true; // If a fileName clashes for a versionable file
|
||||
private boolean overwrite = false; // If a fileName clashes for a versionable file
|
||||
|
||||
private MultiPartBuilder()
|
||||
{
|
||||
@@ -225,11 +225,13 @@ public class MultiPartBuilder
|
||||
|
||||
public MultiPartRequest build() throws IOException
|
||||
{
|
||||
assertNotNull(fileData);
|
||||
List<Part> parts = new ArrayList<>();
|
||||
|
||||
parts.add(new FilePart("filedata", fileData.getFileName(), fileData.getFile(), fileData.getMimetype(), null));
|
||||
addPartIfNotNull(parts, "filename", fileData.getFileName());
|
||||
if (fileData != null)
|
||||
{
|
||||
parts.add(new FilePart("filedata", fileData.getFileName(), fileData.getFile(), fileData.getMimetype(), null));
|
||||
addPartIfNotNull(parts, "filename", fileData.getFileName());
|
||||
}
|
||||
addPartIfNotNull(parts, "siteid", siteId);
|
||||
addPartIfNotNull(parts, "containerid", containerId);
|
||||
addPartIfNotNull(parts, "destination", destination);
|
||||
|
Reference in New Issue
Block a user