I faced the same problem. To fix I found two solutions :
- set STRAPI_ADMIN_BACKEND_URL to the URL of your strapi instance. It seems that it should be done at build time
- use the following patch package
diff --git a/node_modules/@strapi/plugin-upload/admin/src/utils/appendSearchParamsToUrl.js b/node_modules/@strapi/plugin-upload/admin/src/utils/appendSearchParamsToUrl.js
index 730ba50..142f333 100644
--- a/node_modules/@strapi/plugin-upload/admin/src/utils/appendSearchParamsToUrl.js
+++ b/node_modules/@strapi/plugin-upload/admin/src/utils/appendSearchParamsToUrl.js
@@ -10,7 +10,7 @@ const appendSearchParamsToUrl = ({ url, params }) => {
return url;
}
- const urlObj = new URL(url, window.strapi.backendURL ?? window.location.origin);
+ const urlObj = new URL(url, window.strapi.backendURL || window.location.origin);
Object.entries(params).forEach(([key, value]) => {
if (value !== undefined) {