Skip to content
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

private assets signing configuration #165

Merged
merged 2 commits into from
Apr 28, 2023
Merged

Conversation

Marc-Roig
Copy link
Contributor

@Marc-Roig Marc-Roig commented Mar 20, 2023

Hello! First I do want to say that this is an awesome plugin, and THANK YOU for maintaining it.

In Strapi we are working on supporting private configurations for providers strapi/strapi#15773 . Meaning that files that are uploaded to be private can be visualised in the Content Manager

This work will be released in 4.9.0.

What does it do?

This is the work of @jihyukbae, he was trying to test the feature using this specific provider so all props to him! I am just creating this PR and asking for feedback.

This work adds support to visualise gcp private assets in the Content Manager.

We would appreciate if some of you could review this work and express your opinions / suggestions :) This feedback can help reshape and improve the current implementation of file signing.

Why is it needed?

So users uploading private assets can display those in the content manager.

How to test it?

  • Use 4.9.0 version of strapi.
  • Set the publicFiles config to false
  • Upload a new image in the Media Library.
  • That file url should be signed and you should be able to display that asset.

Copy link

@jihyukbae jihyukbae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a maintainer, but I can confirm that this worked for me! @Lith Would you mind taking a look?

@jihyukbae
Copy link

@Lith Gentle ping for review - this feature would be awesome to have for our team!

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 16.66% and project coverage change: -3.49 ⚠️

Comparison is base (0d7e438) 78.70% compared to head (48e17cc) 75.22%.

❗ Current head 48e17cc differs from pull request most recent head a2f9cd5. Consider uploading reports for the commit a2f9cd5 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
- Coverage   78.70%   75.22%   -3.49%     
==========================================
  Files           2        2              
  Lines         108      113       +5     
==========================================
  Hits           85       85              
- Misses         23       28       +5     
Impacted Files Coverage Δ
lib/provider.js 74.77% <16.66%> (-3.53%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ciaranwaters
Copy link

Hi. Firstly I'd like to say a big thanks for this project, its brilliant.

Any idea when this will be merged into the main branch and be available to use?

@ciaranwaters
Copy link

@Marc-Roig It looks like you might need to sign the commits before they can be merged

@jihyukbae
Copy link

@Marc-Roig Could you sign the commits and merge this PR when you get a chance?

@ciaranwaters In the meantime, if you need/want this feature in advance, you can use patch-package and grab the changes in this PR.

@Marc-Roig
Copy link
Contributor Author

@ciaranwaters @jihyukbae
sorry for the delay, it was a busy week :)

They should be signed by now, thank you for waiting

Signed-off-by: Marc Roig <marc.roig.campos@strapi.io>
Signed-off-by: Marc Roig <marc.roig.campos@strapi.io>
@jihyukbae
Copy link

No worries and thank you Marc!

@Lith Could you approve running the necessary workflows for this PR and merge?

@Lith Lith merged commit 48ac52d into strapi-community:master Apr 28, 2023
2 checks passed
@kashkashio
Copy link

kashkashio commented Apr 30, 2023

Hello, for some reason i'm having trouble making this one to work...
Bucket set to fine-grain, bucket access is public. the public flag for the provider is set to false, I updated strapi and plugin to 4.10.1 but still cant make it work. middleware cors is also set properly...
no previews or thumbnails on the strapi admin. any clue? thanks for the great work tho!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants