Closed BhavinHoum closed 3 years ago
Hi,
You have to use the name param or extension Because Now the preview doesn’t know the file type
‘’’
window.PreviewAnyFile.previewPath( win => console.log("open status",win), error => console.error("open failed", error), "http://www.domain.com/samplefile",{name : file.pdf} );
‘’’
Regards,
Mostafa Mansour Software Engineer 00971 524988466 0020 1113019196
On 23 Jul 2021, at 1:12 PM, Bhavin Vadhiya @.***> wrote:
— 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/31, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABSFOB7RKAZNJZV2PGE5YGDTZFFAZANCNFSM5A3ZVEMQ.
I'm also facing the same issue, tried it with both name
and mimeType
but i still face this issue
window.PreviewAnyFile.previewPath( win => console.log("open status",win), error => console.error("open failed", error), $scope.document.url, {mimeType:'application/pdf', name: $scope.document.fileName} );
if it makes any difference, the url is from S3 bucket and i'm testing this on emulator
you are sure that name: $scope.document.fileName has the .pdf in the last?
this soln helped me, i was using an encoded URL, i had to just update it to decodeURIComponent($scope.document.url)
thanks for sharing the solution with me