Media Library - TypeError: Invalid URL

System Information
  • Strapi Version: 4.17.1:
  • Operating System: Ubuntu Latest/Windows 10 (for development):
  • Database: Postgres:
  • Node Version: 20.13.1:
  • NPM Version: 10.8.0:

So, I tried to configure the CDN in my strapi application and I used the CDN_URL and CDN_ROOT_PATH in my .env file, but internaly we changed our minds about the CDN and decided to not setup it anymore, but after trying to access the media library inside our project to see all the folders & files we created it return an error and we can’t see and upload any file anymore.

The error is the following:

[2024-05-29 13:55:39.962] http: GET /upload/files?sort=createdAt:DESC&page=1&pageSize=100&filters[$and][0][folderPath][$eq]=/ (787 ms) 500
[2024-05-29 13:55:44.780] error: Invalid URL
    at new URL (node:internal/url:797:36)
    at isUrlFromBucket (C:\Users\User\Desktop\dev\Next\Company\company-strapi\node_modules\@strapi\provider-upload-aws-s3\dist\index.js:8:15)
    at Object.getSignedUrl (C:\Users\User\Desktop\dev\Next\Company\company-strapi\node_modules\@strapi\provider-upload-aws-s3\dist\index.js:126:14)
    at Object.getSignedUrl (C:\Users\User\Desktop\dev\Next\Company\company-strapi\node_modules\@strapi\plugin-upload\server\register.js:80:35)
    at signUrl (C:\Users\User\Desktop\dev\Next\Company\company-strapi\node_modules\@strapi\plugin-upload\server\services\file.js:38:38)
    at signFileUrls (C:\Users\User\Desktop\dev\Next\Company\company-strapi\node_modules\@strapi\plugin-upload\server\services\file.js:46:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:\Users\User\Desktop\dev\Next\Company\company-strapi\node_modules\p-map\index.js:57:22

I’m using the S3 Provider.

Can someone help me fix this issue pls?