New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Importing Images while using AWS S3 strips extention and folder #26
Comments
just realised I was still signed into the wrong account :(. |
If there is no issue I close this one ;) |
Hi, there is still a issue with this unfortunately :(. |
What the issue? |
So, using the JSON below, I am trying to import a image into a media field using a URL
Right after the import I get a white screen and when I check the files table in the database, the URL for the image was imported but with the image folder missing and the image extension shown as undefined. So this is what end up being saved in the db
Which is what is causing the white screen. If I add the correct image extension and folder to the URL, everything works as expected. Also, if I upload the image to the media field directly, it uses the correct URL. I am using the AWS S3 provider plugin for saving images to S3, I do not know if that might have any bearing on the issue |
To better understand, what did you mean? |
Ah, the github account i wrote the issue with is a bot account not my personal account. I forgot to log out of it after setting up some pipelines. |
So I noticed the issue is still closed, does that mean it doesn't come from the plugin? |
I will try to reproduce the issue using your image url |
I can confirm that this happens when using AWS. Can't confirm with other providers. Context for reproduction is that we are using two strapi instances, one for staging and one for production and we transfer between the two, so I'm not sure if the author of this thread is doing something similar. |
Whew, I'm glad it wasn't me mucking things up :). My circumstance is that I am migrating my content from a different CMS to Strapi. So I have all the content exported in JSON format and I just needed to import them into Strapi. Your plugin is working perfectly for that barring the image issue. |
I confirm the same behavior with AWS s3
This is what's I end up with int the db |
And that makes strapi pages with those images die. So we definitely need extra checks. |
Seeing the impact of the issue this will be my priority |
Many thanks 🙏 |
Version
|
Works like a charm. Many thanks for the quick fix 🙏 |
version 1.9.2 is working as expected, but in 1.10 files are not uploaded to db nor the bucket |
Give a try to version |
Describe the bug
I am uploading an entry into a collection which has an image. The image uploads but I then get a white screen on the collection page. Looking at the database, I can see the URL got imported, but the aws folder and the image extension both seemed to have been stripped out. If I upload the image using the media upload button it works properly.
In the screenshot above, the first entry was uploaded normally, but the second and third were imported and they are missing both the image extension and the image folder. The second image should be
https://giochigatsby.s3.eu-west-1.amazonaws.com/misc_images/chrismitoli_2021-10-26-170225_icpo.jpeg
instead ofhttps://giochigatsby.s3.eu-west-1.amazonaws.com/chrismitoli_2021-10-26-170225_icpoundefined
.This is the import JSON I am currently using
Additional context
I am using the AWS-S3 provider plugin
The text was updated successfully, but these errors were encountered: