Hi,
I used your code for manage my alfresco repository, I tested the upload document service. But it doesn't work, I used the alfresco 4.1. The follow is test code:
@Test
public void testUploadContent() {
ContentService contentService = new ContentService(BASE_URL, "admin");
ContentUploadForm uploadMetadata = new ContentUploadForm();
FileDataSource fileDataSource = new FileDataSource("G:\\result.txt");
uploadMetadata.setFileData(fileDataSource);
uploadMetadata.setDestination("workspace://SpacesStore/935f540f-8447-49dd-a355-5649d0c6c2d5");
uploadMetadata.setFileName("result.txt");
uploadMetadata.setDescription("Test REST upload");
try {
System.out.println(contentService.uploadDocument(uploadMetadata));
} catch (ContentException e) {
e.printStackTrace();
}
}
and this is the test results screenshots:

I checked the 'upload.post.js', and found it doesn't received the file object, what's going on?
Hi,
I used your code for manage my alfresco repository, I tested the upload document service. But it doesn't work, I used the alfresco 4.1. The follow is test code:
and this is the test results screenshots:

I checked the 'upload.post.js', and found it doesn't received the file object, what's going on?