I am using the master branch of Angular project and branch update_annotation_to_21_7 of Java-Spring project, once the annotation lib wasn’t updated in the master branch yet:.
- GitHub - groupdocs-total/GroupDocs.Total-for-Java-Spring: Moved to https://github.com/groupdocs-total/GroupDocs.Total-for-Java/tree/main/Demos/Spring
- GitHub - groupdocs-total/GroupDocs.Total-Angular: Angular based UI for GroupDocs Products
In the Angular project, in the annotation.service.ts we have the following snippet of code:
getDownloadUrl(credentials: FileCredentials) {
return this._config.getAnnotationApiEndpoint() + Api.DOWNLOAD_ANNOTATED + '/?path=' + credentials.guid;
}
This method calls a GET /downloadAnnotated?path=C:\exemple-file.docx
There are two problems with it, first the backslash cannot be used in browser URL, the second is this service is mapped differently in the backend, it is mapped as a POST method and the contract is different. See the file.
@RequestMapping(method = RequestMethod.POST, value = "/downloadAnnotated", consumes = APPLICATION_JSON_VALUE)
public void downloadAnnotated(@RequestBody AnnotateDocumentRequest annotateDocumentRequest, HttpServletResponse response) {
...
}