452
Views
6
Comments
Solved
Open page w/ file in new tab when clicking the link
Question

Hello,


So... basically I'm trying to visualize a file, inserted by the user, in a new tab when clicking on a link (with that file). How can i do it? I tried in extended properties of the link with targer "_blank" but t doesn't work. 


Can anyone help me out?

2019-05-22 11-30-09
Marcelo Ferreira
Solution

Hi Joana,

I was able to use this component. But I had to do some changes to it and I already explain the changes here since someone else was having the same problem.

Regards,

Marcelo

UserImage.jpg
Jorge Cerveira

Hi Joana,

From what I understand there can be 2 situations:

  1. User inserts a URL for the file and you save the URL.
  2. User inserts a file and you save the binary data from the file.


1) If it's the URL you can use target:"_blank" and it should work.

2) You need to create a webscreen that will load the file from the DB and show it. You should use the link from the new webscreen (with an input that would be able to retrieve the binary from the DB) and use target:"_blank".



Best Regards,

Jorge Cerveira


2019-01-28 11-36-18
joananascimento

Jorge Cerveira wrote:

Hi Joana,

From what I understand there can be 2 situations:

  1. User inserts a URL for the file and you save the URL.
  2. User inserts a file and you save the binary data from the file.


1) If it's the URL you can use target:"_blank" and it should work.

2) You need to create a webscreen that will load the file from the DB and show it. You should use the link from the new webscreen (with an input that would be able to retrieve the binary from the DB) and use target:"_blank".



Best Regards,

Jorge Cerveira


Hello,

I tried that way, i can do it with an image but i want to do it with a pdf, for i.e..


UserImage.jpg
Jorge Cerveira

joananascimento wrote:

Jorge Cerveira wrote:

Hi Joana,

From what I understand there can be 2 situations:

  1. User inserts a URL for the file and you save the URL.
  2. User inserts a file and you save the binary data from the file.


1) If it's the URL you can use target:"_blank" and it should work.

2) You need to create a webscreen that will load the file from the DB and show it. You should use the link from the new webscreen (with an input that would be able to retrieve the binary from the DB) and use target:"_blank".



Best Regards,

Jorge Cerveira


Hello,

I tried that way, i can do it with an image but i want to do it with a pdf, for i.e..


Hi again,

To see the content of a pdf you probably need to use something like this:

https://www.outsystems.com/forge/component-overview/1281/web-previewer


Use this on a webscreen to show the content of the file. So follow the 2). This component can use an URL or a file from the database.

Hope it helps.


Best Regards,

Jorge Cerveira

2019-05-22 11-30-09
Marcelo Ferreira

Hi,

Web-previewer is a good option for images and word documents. But you will have problems with pdf's. In my current project I'm looking for a better option and I will let you know if I find anything.

Regards,

Marcelo

2019-01-28 11-36-18
joananascimento

Marcelo Ferreira wrote:

Hi,

Web-previewer is a good option for images and word documents. But you will have problems with pdf's. In my current project I'm looking for a better option and I will let you know if I find anything.

Regards,

Marcelo


Hello Marcelo,


Thank you for your reply. I'll be waiting for your feedback! Meanwhile, i will try another ways too. 


Regards,

2019-05-22 11-30-09
Marcelo Ferreira
Solution

Hi Joana,

I was able to use this component. But I had to do some changes to it and I already explain the changes here since someone else was having the same problem.

Regards,

Marcelo

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