File gallery or image viewer

Hi

I want to be able to present a pdf document to the user based on an order. The document is in a fixed share on a server.
I tried image viewer, with the URI
file://servername/PDFARCHIVE/client/documment.pdf
but when I run it I get Invalid image URI.

so Then I tried File Gallery, but the document is already uploaded, so I do not need the user to upload it, just to view it.
Where do I fix the file share ?

Thanks

Paul

Hi Paul!

You can add a source to the file galley element, that way the user can click on the PDF and it will open on the device in an external app for PDF viewing. Use the File System connector to read the file into the WorkFlow. File gallery expects a File table with columns: name and binary data. [filename, data] (same as the file gallery outputs).

File gallery | Flow Help (novacuraflow.com)

Hope this helps :slight_smile:

in the image gallery I keep getting invalid URI for a jpg. What is the syntax for the URI field.
is it File://path/file ? or must it be a HTTP connection.

Just as an addition - if I run it from the studio, it works ok, by just putting the path in, but does not run on the client,.

Thanks

Paul

Hi,

you cant use Image viewer to show pdf files. It only works for jpg, jpeg, gif, bmp, png…
Also the image viewer only accepts http / https urls to images.
(You can get around this by using the file connector and write the image to wwwroot of the machine where the server is installed…just dont forget to clean up :slight_smile: )




You can use the file gallery as Albin sugested (no preview though, user will click on an icon, download a copy of the file and then view it)

The path to use when fetching the file is the network path of the share, in my example:

But then you have to do some…creative fetching from flow :slight_smile:

You first need to use File Connector to write file to zip, then zip to stream and then take that stream and put in in the appropriate format for File Viewer to accept (standard Flow format when working with files record / table with 2 columns: filename and data)
So something like this:

Test pdf2.flow (79.9 KB)

I am not sure why you can reach the share from studio but not from client, the path should be reachable in clients if the server can get to it (its the server who does all the work)

Which client are you trying from? What error are you getting?

Hope this helps!

B R
Ivan

Hi

This is great, thanks.

We don’t have the file connector so might have to find a work around for that.

To answer your question in the studio it works ok see below

But the same flow on the windows client

I will try what you have sent,

Thanks again !

Paul