mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 00:51:17 +00:00
16 lines
287 B
JavaScript
16 lines
287 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
const folderModel = 'plugin::upload.folder';
|
||
|
|
||
|
const getLocation = async folderId => {
|
||
|
if (!folderId) return '/';
|
||
|
|
||
|
const parentFolder = await strapi.entityService.findOne(folderModel, folderId);
|
||
|
|
||
|
return parentFolder.location;
|
||
|
};
|
||
|
|
||
|
module.exports = {
|
||
|
getLocation,
|
||
|
};
|