From 0177b60b444156175a53b199410897effc03460e Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 20 Jul 2018 10:52:23 +0200 Subject: [PATCH] MOBILE-2478 desktop: Fix files linked in HTML --- src/providers/filepool.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/providers/filepool.ts b/src/providers/filepool.ts index 31c53a230..d0a9b1e83 100644 --- a/src/providers/filepool.ts +++ b/src/providers/filepool.ts @@ -1757,7 +1757,12 @@ export class CoreFilepoolProvider { if (this.fileProvider.isAvailable()) { return Promise.resolve(this.getFilePath(siteId, fileId)).then((path) => { return this.fileProvider.getFile(path).then((fileEntry) => { - return fileEntry.toURL(); + // This URL is usually used to launch files or put them in HTML. In desktop we need the internal URL. + if (this.appProvider.isDesktop()) { + return fileEntry.toInternalURL(); + } else { + return fileEntry.toURL(); + } }); }); }