You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
Hi,
If a user uploads a second image named as a previously uploaded image, first image disappear and generates 404 error. For example uploading "default.png" in several articles.
To solve this we are using shorId library to generate a random value (like ECOMMERCE>ORDERS).
<image keyName="backimage" title="Upload your image"
uiParams={{
filename: shortId.generate()
}}
/>
The problem is that shortId.generate() returns always the same value.
How can we use shortID for uiParams filename correctly?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi, thanks for your report, currently the filename only support fixed string. So what if we support the function in filename property, like this:
<imagekeyName="backimage"title="Upload your image"uiParams={{filename: (file)=>{// you also can get the origin file from argumentreturn`${file.name}${shortId.generate()}`}}}/>
Hi,
If a user uploads a second image named as a previously uploaded image, first image disappear and generates 404 error. For example uploading "default.png" in several articles.
To solve this we are using shorId library to generate a random value (like ECOMMERCE>ORDERS).
The problem is that shortId.generate() returns always the same value.
How can we use shortID for uiParams filename correctly?
Thanks!
The text was updated successfully, but these errors were encountered: