Multiple file in a file viewer

I have a field with an array of string to get several image as files. Is there a way to display all these image in a file viewer ?

Hi @PierreGaladrim,

You mean for instance like this?

This is possible by going to the field settings and selecting the file viewer widget.

Let me know if that helps!
Thanks.

Yeah exactly like that !
Can you show me what the value looks like ?

@PierreGaladrim It’s just a basic array of strings (the strings being the image full urls - or the relative url with a prefix).
Is it not working on your side?

Something like that ?
[img1.jpeg, img2.jpeg, img3.jpeg, img4.jpeg, img5.jpeg]

Hello @PierreGaladrim,

It depends on how are stored your images, you can get full documentation on what you want to achieve by clinking on this link.

Let me know if it helps, :slight_smile:

As you can see the carousel don’t make a difference between one or multiple image instead the type is [String]

okay thanks, it seems that there is a problem in the configuration of the file viewer prefix, can you tell me what you have put in the input prefix?

Thanks, :slight_smile:

I use a custom path to find my image and it work perfectly when I only have one picture. It just take my array as a single file.

image

Hi @PierreGaladrim,

Could you share one of your photos field> I mean if you go to the network tabs and give me the response you get from your server :pray:

Hi @vince

Here is my network, the response tab is null.

Sorry I was not clear enough I mean the data from the listing view :sweat_smile:

You mean in the console ? Or when i click on one data ( Missing prefix to base64 data ) ?

I mean the reponse of GET /forest/your-collection-name a call like that :wink:

I got this :

image

Where is your field photos defined ? In which collection ?

In a portfolio collection like that :

image

I almost tried with DataTypes.STRING cause i’m using mySQL but it didn’t work.

Okey so in your network tab could you share the response you have on the call GET /forest/portofolios :pray:

This ?

This one but on your browser :sweat_smile:, in the network tab