Hi, I expect the images uploaded by the users to display on Forest Admin with the Widget File Viewer.
I use Active Storage (Ruby on Rails) in the code of the app.
## Actual behavior
On the general view for Active Storage Attachment I have only small green icon. No images.
When I click on the detailed view I have the following for the fields :
Preview image attachment : nothing!
Preview image blob : nothing!
Filename : “Preview not available this type of file” while it is a jpeg file
The issue is only with Forest Admin. On the App everything looks good.
I really need this File Viewer Widget working to validate the profile of my app’s users.
Thank you for your help @anon34731316.
I’ve seen already this documentation but still nothing. Images are saved on Amazon S3 indeed. I’m still searching what happen…
When I go on table “Active storage Blobs” --> I have several fields :
id
key
filename
contentype
metadata
bytesize
checkcum
created at.
Which one do I have to configure the display widget as “file viewer” ? Key field or Filename field ?
Indeed I’ve seen I have to add the prefix like this : https://aws.s3/my-folder/
–> How do I know the name of the folder ??
I user the add-on Bucketeer on Heroku. This add-on manages aws s3. I don’t have any aws account as Bucketeer does the job with Heroku.
Hello @meryldelpech.
If you do not manage your images by yourself, you still have to know where it can be accessed. The Bucketeer service should give you this.
Anyway, as @vince mentions it, you may find this base url by having a look in the network tab of a web page that displays correctly one of your image, or maybe by right-clicking on an image and save the link.
Hi @Sliman_Medini, thanks for your advice.
I don’t know where to find the images stored by Bucketeer service, that’s the point.
As you mentionned, for the moment no web page displays the images. So I can’t see the base url.
It seems impossible to see these images while it should be simple (and I really need to see them on Forest Admin)
Please refer to the Bucketeer-Heroku documentation, there’s no way you can’t get access to your bucket’s name/id or URLs pointing to assets otherwise how would your app know how to fetch those?
When I set https://bucketeerName.s3.region.amazonaws.com/ on display settings for Key field I still get “Preview not available”.
It seems the url is more complexe than the one shown on forest Admin documentation and needs Key field AND Filname field. How to deal with that ?
Regarding the aws S3 URLs at which you can reach your assets, this might help
You probably want to keep the same file logic lifecycle management in your app’s backend and in the Forest Admin backend. Can you get the person managing bucketeer add-on for you to add it to your admin backend? Bucketeer has a node.js client per its documentation and there is an AWS SDK for JavaScript in node.js as well.
Hi @anon20071947,
I think I’ve read the bucketeer documentation with Ruby and the forest admin documentation about file viewer at least 10 times… I just don’t want to make mistakes on the code and scratch the app where there are no errors!
I don’t know how to setup the prefix as asking by forest admin because my path to the image is not as simple as that!