38
Views
4
Comments
Solved
view phsycal pdf file using file view pludgin and file systems
Question

HI i'm deddy

i try to view phsycal pdf file using mobile outystems. when i want to viewing , i got error "cannot display pdf, file cannot be opened". i try to debugging. url https://xxx-xxx.outsystemscloud.com/MobileInvoice/UploadScreen/TempFolder/aaa.pdf 


when i tried to copas that url in my browser :

how i can solve it ?

regards


Deddy

2019-09-24 18-41-25
Jorge Martins
 
MVP
Solution

Hi deddy effendi,

The FileSystem forge component allows you to manipulate the server's file system, that is true... but that location will not be directly accessible by public URL.

When you save a file, you need to find the right path on the filesystem, unrelated to any URL of the application itself. Then, if you want to access it, you will need to create a screen to access that path and download the file. If there are multiple files, you will need to pass some input to the new screen so that it can determine the right file to download. Finally, you will likely need to manually build the URL to the new screen (with any input parameter needed) as the URL for the file to download/open from your device.

Hope this helps!

2021-07-14 09-27-33
Luís Cardoso

Hello,

How are you uploading the file? Did you double-check the path "UploadScreen/TempFolder"? Is this correct?

BR,

Luis

UserImage.jpg
deddy effendi

hi luis

i'm uploading file using file systems, when i want to display it. like this :



i got url variabel from :


so i got url > url https://xxx-xxx.outsystemscloud.com/MobileInvoice/UploadScreen/TempFolder/aaa.pdf  

how do i fix it ?


regards


Deddy

2023-10-16 05-50-48
Shingo Lam

deddy effendi wrote:

hi luis

i'm uploading file using file systems, when i want to display it. like this :



i got url variabel from :


so i got url > url https://xxx-xxx.outsystemscloud.com/MobileInvoice/UploadScreen/TempFolder/aaa.pdf  

how do i fix it ?


regards


Deddy

Hi,

There are 2 ways to fix this:

  1. Public 1 service to get the file via the url
  2. Need to activate the Directory Browsing in IIS if the url is directly linked to physical files 

Hope this help 

2019-09-24 18-41-25
Jorge Martins
 
MVP
Solution

Hi deddy effendi,

The FileSystem forge component allows you to manipulate the server's file system, that is true... but that location will not be directly accessible by public URL.

When you save a file, you need to find the right path on the filesystem, unrelated to any URL of the application itself. Then, if you want to access it, you will need to create a screen to access that path and download the file. If there are multiple files, you will need to pass some input to the new screen so that it can determine the right file to download. Finally, you will likely need to manually build the URL to the new screen (with any input parameter needed) as the URL for the file to download/open from your device.

Hope this helps!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.