Pls I need sample code how to upload scanned document from dynmsoft webtwin scanner to specific folder on repository.
I tried the below code but not working
var uploadfilename="TestScannedDoc;
var strHTTPServer ="127.0.0.1";
var CurrentPathName = unescape(location.pathname);
DWObject.HTTPPort = "8080";
var strActionPage ="alfresco/api/-default-/public/cmis/versions/1.1/atom";
DWObject.HTTPUploadAllThroughPostAsPDF(strHTTPServer, strActionPage, uploadfilename + ".pdf", OnSuccess, OnFailure);
This way you can upload document.
var $siteURL = Alfresco.util.siteURL;
var url = Alfresco.constants.PROXY_URI+'api/upload';
var today = formatDate(new Date())+"-"+Math.random();
DWObject.ClearAllHTTPFormField();
DWObject.SetHTTPFormField("siteId", Alfresco.constants.SITE);
DWObject.SetHTTPFormField("containerId", Alfresco.constants.PAGEID);
DWObject.SetHTTPFormField("overwrite", 'false');
console.log("currentPath:"+currentPath);
DWObject.SetHTTPFormField("uploaddirectory", this.currentPath);
DWObject.ConvertToBlob(indicesAre, EnumDWT_ImageType.IT_PDF,
function (result) {
DWObject.SetHTTPFormField('filedata', result, today+".pdf");
DWObject.HTTPUpload(url, OnHttpUploadSuccess, OnHttpUploadFailure);
}, asyncFailureFunc);
Thanks For your replay but can you tell me please how to use alfresco java script API so that i can use your code i am searching from long time but no success.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.