Jump to content
  • 0

Show a Caspio image on HTML Block using Security Parameters


VincenzoCocciolo

Question

Hi, I'm trying to add a nice user picture in my app.

I added the image file in my Login table and created the Authorization object.

Now I need to place the correct image HTML tag into my HTML Block of a certain Datapage.

I have the image parameter:     [@authfield:Login_Picture]

image.png.dae79efcc58c1727bf27ddd497182928.png

 

And this is the standard HTML Image tag

<img alt="USer Picture" src="???????????" style="width: 50px; height: 50px; margin: 1px;" />

How to compose the correct link?

I also found a similar 2008 question but the solution didn't works

 

Thanks in advance for any help

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @VincenzoCocciolo,

It looks like the issue is related to the parameter format. When you add the File field to the HTML block with a Picker icon, it is added as a String.

kYjTOFf.png

So, please add the slash sign to render the link  as URL.

You may find this information in this article (the table at the end of the article ) https://howto.caspio.com/parameters/displaying-parameters/

Hope this helps.

Link to comment
Share on other sites

  • 0

Hello @VincenzoCocciolo - Based on what I experinced, you need to call the actual field in the DataSource that you use in the DataPage or a file that is located in the App parameter in order to use it in your HTML image code. So basically, you cannot use the image file that is attached in your authentication  parameter. 

I hope this makes things clear. :) 

Link to comment
Share on other sites

  • 0

As a follow up to @WatashiwaJin, you may want to try the instructions on this file:

 

 

1) Create a dummy report detail page. feel free to use any data source for this.

 

2) On "Configure Details Page Fields", create an HTML block then click the image picker and use app parameter similar to what is instructed from previous emails. You may disregard the other fields.

image.png.170ad4188dc8f53f1860bc96ea8c1506.png

 

3) Click finish and deploy this datapage. Access this datapage by its URL and proceed to the results until you see the picture. Right click on it and get the image address:

image.png.e11809f64418633477525902bc28d165.png

4) Go to your authentications and create another HTML block. Use the Image picker again like on the step 2.  This time, use the URL of the picture from your report datapage.
 

 

image.png.fe3b6820665c3fa16b7716e257a45155.png

 

5) Click save and try accessing the authentication now.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...