5 lines
159 B
TypeScript
5 lines
159 B
TypeScript
|
|
export function extractFileIdFromNginxUrl(url: string) {
|
||
|
|
const match = url.match(/uploads\/(\d{4}\/\d{2}\/\d{2}\/[^/]+)/);
|
||
|
|
return match ? match[1] : '';
|
||
|
|
}
|