feat: introduce publicid to filename template (#1713)

* Add support for `publicid` in PathTemplate

* Use `publicid` by default instead of `filename` in filesystem

* Fix blank string of `systemSettingLocalStoragePath` affect incorrectly

* Add ext name to compatible with OS's preview

* Optimize code for systemSettingLocalStoragePath empty

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
This commit is contained in:
Athurg Gooth
2023-05-23 19:15:30 +08:00
committed by GitHub
parent d24632682f
commit 616b8b0ee6
2 changed files with 15 additions and 12 deletions

View File

@ -52,7 +52,7 @@ const UpdateLocalStorageDialog: React.FC<Props> = (props: Props) => {
<p className="text-sm break-words mb-1">{t("setting.storage-section.update-local-path-description")}</p>
<div className="flex flex-row">
<p className="text-sm text-gray-400 mb-2 break-all">
{t("common.e.g")} {"assets/{timestamp}_{filename}"}
{t("common.e.g")} {"assets/{publicid}"}
</p>
<HelpButton hint={t("common.learn-more")} url="https://usememos.com/docs/local-storage" />
</div>