Questions on FormField types

I have read through the documentation and I have few questions on the Form - FileFormField

  1. What are the other values for [Accept] beside than default value (image/*)?

  2. Can I upload any text file or PDF file and store as varbinary?

  3. As for now, I use value (File/*) in [Accept], and database store as [nvarchar(max)]. How can I display it OR download it from the display main page?

Check this thread: RadzenUpload Accept FileTypes

The content of the FileFormField is available as base 64 encoding string (DATA URI). Conversion to varbinary is not provided by default.

If it is an image you can display it by using a Image component.

Hi, what about to download file such like PDF, txt, or excel ?

You can check this thread:

Hi team,

I have checked the article.

I try use the following code in the DataGrid Edit Template using HTML but I still hit error when run the application. May I know is my code problem or is there any other place need to be configure?

Table name : Doc
Column name (which store the uploaded file in nvarchar(max) : Doc1

<a [href]="data.Doc1 | safe" download="Doc1.${getExtension(data.Doc1)}">download

We don't know what that error is.

We haven't seen your code and as a result can't tell if it is the problem or not.

Please check our forum FAQ for tips how to improve your questions so we get a chance to help you.

Hi,

This is my code that put in Data Grid Edit Template

This is my DB table data.
image

This is the error code when I open the page.

As the error suggest you don't have a function called getExtension. The thread I linked contains the definition of it.

Create a page property with Name getExtension and set its Value to

value: (dataURI) => {return dataURI.substring(dataURI.indexOf('/') + 1, dataURI.indexOf(';base64'));}

Hi,
It working!!!.

Thanks a lot.