mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126558 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 124298 jvonka: RA-834: Optionally request generation of a rendition on content creation (eg. file upload) - hmm, need to review whether it makes sense to request rendition for empty content (-> if it will fail) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126904 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -484,16 +484,19 @@ public class RenditionsTest extends AbstractBaseApiTest
|
|||||||
assertNotNull(rendition);
|
assertNotNull(rendition);
|
||||||
assertEquals(RenditionStatus.CREATED, rendition.getStatus());
|
assertEquals(RenditionStatus.CREATED, rendition.getStatus());
|
||||||
|
|
||||||
// also accepted for JSON when creating empty file (albeit with no content)
|
/*
|
||||||
|
// TODO open question
|
||||||
|
// - should we accept for JSON when creating empty file (ie. with zero-byte content)
|
||||||
|
// - eg. might fail, eg. doclib for empty plain text / pdf ?
|
||||||
Document d1 = new Document();
|
Document d1 = new Document();
|
||||||
d1.setName("d1.txt");
|
d1.setName("d1.pdf");
|
||||||
d1.setNodeType("cm:content");
|
d1.setNodeType("cm:content");
|
||||||
ContentInfo ci = new ContentInfo();
|
ContentInfo ci = new ContentInfo();
|
||||||
ci.setMimeType("text/plain");
|
ci.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||||
d1.setContent(ci);
|
d1.setContent(ci);
|
||||||
|
|
||||||
// create empty file including request to generate imgpreview thumbnail
|
// create empty file including request to generate a thumbnail
|
||||||
renditionName = "medium";
|
renditionName = "doclib";
|
||||||
response = post(getNodeChildrenUrl(folder_Id), userId, toJsonAsStringNonNull(d1), "?renditions="+renditionName, 201);
|
response = post(getNodeChildrenUrl(folder_Id), userId, toJsonAsStringNonNull(d1), "?renditions="+renditionName, 201);
|
||||||
Document documentResp = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
Document documentResp = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||||
String d1Id = documentResp.getId();
|
String d1Id = documentResp.getId();
|
||||||
@@ -502,7 +505,7 @@ public class RenditionsTest extends AbstractBaseApiTest
|
|||||||
rendition = waitAndGetRendition(userId, d1Id, renditionName);
|
rendition = waitAndGetRendition(userId, d1Id, renditionName);
|
||||||
assertNotNull(rendition);
|
assertNotNull(rendition);
|
||||||
assertEquals(RenditionStatus.CREATED, rendition.getStatus());
|
assertEquals(RenditionStatus.CREATED, rendition.getStatus());
|
||||||
|
*/
|
||||||
|
|
||||||
// -ve - currently we do not support multiple rendition requests on create
|
// -ve - currently we do not support multiple rendition requests on create
|
||||||
reqBody = MultiPartBuilder.create()
|
reqBody = MultiPartBuilder.create()
|
||||||
|
Reference in New Issue
Block a user