Cannot set baseUrl to an empty string.
mjoynes-14four opened this issue · comments
Marwynn Joynes commented
Describe the bug
You cannot set the baseUrl to an empty string. It will prepend the S3 url.
To Reproduce
Steps to reproduce the behavior:
- Try to set the baseUrl to an empty string.
- Upload and image.
- View URL for image.
Expected behavior
If you provide an empty string to the base URL it should not prepend anything to the url in the database.
Additional context
https://github.com/zoomoid/strapi-provider-upload-aws-s3-advanced/blob/main/lib/index.js#L38
If you change this line to if (config.baseUrl || config.baseUrl === "") {
then it will allow you to use an empty string to prevent it from prepending the S3 url.