collect-system/apps/server/src/upload/utils.ts

5 lines
159 B
TypeScript
Raw Normal View History

2025-01-08 00:52:11 +08:00
export function extractFileIdFromNginxUrl(url: string) {
const match = url.match(/uploads\/(\d{4}\/\d{2}\/\d{2}\/[^/]+)/);
return match ? match[1] : '';
2025-01-27 22:43:31 +08:00
}