Skip to Content
0
Former Member
May 18, 2009 at 05:56 PM

Error opening KM file with special character

26 Views

I'm using the following code to get the url to an file stored in KM, but when some file has the ( or )character in the name, an error occurs saying that the file doesn't exist in KM. The file name look like this (CDU001-C010) Delegar WorkFlow.doc.gif.

IUriReference uriRef;

IURLGeneratorService ugs;

ugs = (IURLGeneratorService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);

uriRef = ugs.getRelativeUri(PathKey.CONTENT_ACCESS_PATH).appendPath(resource.getRID().toExternalForm());

retorno = uriRef.toExternalForm();

thanks.