React-admin: Add `download` attribute for FileField

Created on 10 May 2020  路  2Comments  路  Source: marmelab/react-admin

Is your feature request related to a problem? Please describe.

I cannot set filename with download attribute when passing files as data URIs for FileField-components.

I have a backend that returns files as BASE64 encoded strings and they are not downloadable with direct URLs. I can make them downloadable with FileField-widget by wrapping the widget and passing the files as data URIs. With download-attribute I could also set filename and provide better downloading experience.

Describe the solution you'd like

Add download attribute support for FileField. Attribute could be optional and empty (not rendered) by default, so adding it should be safe an cause no regression for existing uses.

Thank you for this awesome framework!

enhancement

Most helpful comment

Fixed by #4798

All 2 comments

Thanks for the report. Not sure we will implement this. However, you can create your own FileField

Fixed by #4798

Was this page helpful?
0 / 5 - 0 ratings