Closed julia-fix closed 3 years ago
The link is already generated by yourself try to append the extension in the link itself
And also i will try to add option to specify the extension manually
Regards,
Mostafa Mansour Software Engineer 00971 524988466 0020 1113019196
On 30 Jan 2021, at 1:27 AM, July- notifications@github.com wrote:
Is it possible to somehow specify extension other way than in url? I have dynamically generated PDFs in a remote server with urls like "https://mysite.com/pdf/1234" and plugin fails to open these. Need this only for iOS, if that matters
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/mostafa-mansour1/previewAnyFile/issues/13, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABSFOBY6NC6BQJKWSDE4DPTS4MR25ANCNFSM4WZR7SYA.
Solved this by downloading file with FileTransfer plugin and then opening local file. Requires more code but also was able to delete local file immediately after closing viewer, to free device memory. Thanks for a great plugin!
@July-, You could use: var fileExt = fileURL.split('.').pop(); to get the file extension. Then window.PreviewAnyFile.previewPath( (res:any) => callbackSucces(res), (error:any) => callbackFailure(error), fileURL,{name : "file."+fileExt} );
Hope this will help!
Adding file name to remote link was not available when I integrated plugin to my app, this is probably a new option. Maybe will rewrite code to use this update, thanks
yes the updated plugin has the option to add the name or extension the function
Is it possible to somehow specify extension other way than in url? I have dynamically generated PDFs in a remote server with urls like "https://mysite.com/pdf/1234" and plugin fails to open these. Need this only for iOS, if that matters