-
Notifications
You must be signed in to change notification settings - Fork 95
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
Folder created for each file uploded that is completely insane #150
Comments
Hi, I am having this issue as well, did you find a way to circumvent this? @fborgherodbsagency |
Same issue here, did you manage to resolve it? |
@gentaliti I couldn't find a way to fix this, but my front end works well even with the folders. Please let me know if you end up finding a solution. |
Can confirm this. It's a bit unpractical. For example: nuxt-image will not work when used with strapi as provider, correct image name but missing the folder. |
Hi, Yes, it's insane. Do you have this problem from the BackOffice of Strapi, or when you upload your files from your own client ? Thanks, |
Me, personally, I have a nextjs application, where i use this package. When uploading pictures from the client to the google cloud, I find a separate file. Is there any more info I can provide so we can pinpoint this more accurately? |
Hello, As Strapi is creating a size folder for every image, if we only allow the domain in i.e 'storage.googleapis.com' in the middleware we are getting the following error Please let me know if anyone has a solution for this. |
I get the same behaviour (a folder created for each image size of each image uploaded). This isn't the case with the official S3 plugin so I think it is the plugin which is doing it rather than Strapi(?). |
I have got a solution of this problem. This problem is related to Strapi. I have added some code in the plugin.ts. Output - No more individual folders created for each image. Size-wise images are being saved. |
That could work. Thanks for the tip! :) Have you been able to get thumbnails to display in the Media library though? So far in addition to the folder issue I don't see any thumbnail image with |
Thanks for confirming @sulagnacc. Can you copy in the above snippets as code for ease of copy? I'll give things another try. Did you try creating your bucket with |
No, I have tried uniform access only. Here is the code:
middlewares.ts
|
Thanks @sulagnacc this solution works really well. You don't need the extra declarations in Also, if you create your bucket with Much appreciated. |
hi @ianyoung , do you manage to make it work while still using |
@gilvent I did. Which bit are you having problems with? |
hi @ianyoung , when I use // Edit |
It should work with fine-grained access control. My bucket is set to use that. Usually if thumbnails aren't showing in the dashboard it's because of the directive. Make sure you have the following set in
|
This solution worked for me, now the files aren't being sent to a folder anymore, however, I suggest adding a bit more code to prevent duplicate files
|
System is creating one folder for each image that is completely insane also in terms of management.
An image mouse.jpeg with the hash mouse_2cab11f170 gets stored under /mouse_2cab11f170/mouse_2cab11f170.jpeg.
I've seen multiple issues related to this but all of them were closed as MERGED, but we are still experiencing the issue
Originally posted by @fborgherodbsagency in #89 (comment)
The text was updated successfully, but these errors were encountered: