mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
only add backend host as prefix if local server upload when getting singular upload
This commit is contained in:
parent
2d04d25097
commit
ffdde168c5
@ -182,7 +182,11 @@ module.exports = {
|
||||
return ctx.notFound('file.notFound');
|
||||
}
|
||||
|
||||
data.url = strapi.config.url + data.url;
|
||||
// if is local server upload, add backend host as prefix
|
||||
if (data.url[0] === '/') {
|
||||
data.url = strapi.config.url + data.url;
|
||||
}
|
||||
|
||||
ctx.send(data);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user