mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: add public id field to resource (#1451)
* feat: add public id field to resource * feat: support reset resource link
This commit is contained in:
@ -1,6 +1,3 @@
|
||||
export const getResourceUrl = (resource: Resource, withOrigin = true) => {
|
||||
if (resource.externalLink) {
|
||||
return resource.externalLink;
|
||||
}
|
||||
return `${withOrigin ? window.location.origin : ""}/o/r/${resource.id}/${encodeURIComponent(resource.filename)}`;
|
||||
return `${withOrigin ? window.location.origin : ""}/o/r/${resource.id}/${resource.publicId}`;
|
||||
};
|
||||
|
Reference in New Issue
Block a user