02-02-2012 06:05 AM
Caused by: org.alfresco.scripts.ScriptException: 01020002 Failed to execute script 'classpath*:alfresco/extension/templates/webscripts/com/amplexor/dsd/process.post.js': 01020001 ReferenceError: "formdata" is not defined. (file:/home/bart/workspace/dsd/alfresco/target/classes/alfresco/extension/templates/webscripts/com/amplexor/dsd/process.post.js#4)
// start class
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:system-test-context.xml")
public class UploadWebscriptTest extends BaseWebScriptTest{
// test code
PostRequest post = new PostRequest("/dsd/sd/process", FileUtils.readFileToByteArray(f), "application/octet-stream");
Map<String, String> map = new HashMap<String, String>();
map.put("Content-Disposition", "form-data; name=\"file\"; filename=\"dsd\"");
map.put("Content-Transfer-Encoding", "binary");
post.setHeaders(map);
post.setEncoding("multipart/form-data");
sendRequest(post, 200);
02-02-2012 06:12 AM
02-02-2012 06:31 AM
Request get = new GetRequest("/dsd/id/process");
Response response = sendRequest(get, 200);
02-02-2012 07:25 AM
05-22-2013 07:11 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.