Unable to preview the images, file type and file size on File fields in smart action form page after New UI implementation by FA while setting the file src URL in File field's value

:warning:This is a template you must use to report issues. :warning:


Feature(s) impacted

Not able to preview image, file size. When clicking on preview Its shows a white prompt popup. In the console, we get many errors when clicking on the preview. Also not able to close that popup.

Observed behavior

Not able to preview image, file size. When clicking on preview Its shows a white prompt popup. In the console, we get many errors when clicking on the preview. Also not able to close that popup.

Expected behavior

Should be able to preview the images.

Failure Logs

In the console, we get many errors when clicking on the preview.

Context

  • Project name: Curator
  • Team name: Developer
  • Environment name: ALL (Staging, Development, Production)
  • Agent type & version:
  • Package Version: 8.3 (forest-express-sequelize)
  • Express Version: 4.17.1
  • Sequelize Version: 6.6.5
  • Database Dialect: MySql
  • Database Version: 5.7.24

code for load hooks as below

hooks: {
      load: async (context) => {
        const [recordId] = context.request.body.data.attributes.ids;
        const record = await film.findByPk(recordId);
        const [fileField] = context.fields;
        fileField.value = record.file;  //where record.file is file src URL.
        return context.fields;
      }
    }

Hello @Naresh,

Thanks for your message :raised_hands:

Could you tell me if you know if it was working before?
Could you show the error details on the load call you have in your network?
Also, could you tell me what you would like to do here? Check if the image is correct by previewing it?

Thanks.

@anon34731316
Could you tell me if you know if it was working before?
ans: Yes, it was working on last week.

Could you show the error details on the load call you have in your network?
Ans: No there is no issue in the network. Alo it’s loads the images correctly in the network.

3)Ans: No, it’s not able to preview the images. When clicking on preview It shows a white prompt popup. In the console, we get many errors when clicking on the preview. Also not able to close that popup. Below is the attached error.

@Naresh thanks for your answers.

Ans: No there is no issue in the network. Alo it’s loads the images correctly in the network.

Yes I’m very sorry, I meant “Could you show the error details on the load call you have in your Network tab of your browser console?” It seems to be displayed in red, there is probably an error.

Anyway, I am able to reproduce the problem. And you are right, this a regression.
I’m opening a bug report on our side so that it can be fixed asap.
We’ll let you know when it’s fixed.

Thanks for the report!

Hi @anon34731316 When can I expect this fix?

@Naresh,

It’s hard to say with precision, but it should be fixed by the end of the week.

Hi @anon34731316,

The issue is still in the FA. When will this be resolved?

@Naresh sorry for the delay, it should be fixed by now.
Can you confirm it works on your side?

Thanks.

Hi @anon34731316

I have tested it. It loaded the images correctly in the network.

But not able to preview the images.

Pls, find attached screenshots.


@Naresh,

It seems that it was like this before: the preview was not available on image from a source URL in a file picker.
Can you confirm?

Hi @anon34731316,

We could preview images from the source URL in the file picker earlier.

I had raised the ticket in FA below.

After that, I was able to preview images based on the source URL, but this fix broke after the new UI implementation.

Hello @Naresh,

Yes sorry you’re right, depending on the file, the preview was working indeed!
We’ll fix that very soon.

Thanks again for your patience :pray:

Hello @Naresh,

We just released a fix.
Could you try again and tell us if it’s working now?

Thanks a lot.

1 Like

Hi @anon34731316 ,

It’s working now.

Thanks.

1 Like