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

feat: added option to download zip #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ae94
Copy link

@ae94 ae94 commented Jun 17, 2023

What does it do?

Allow to download a zip of all config files

Why is it needed?

Accessing remote configs

How to test it?

Related issue(s)/PR(s)

Closes #54

@boazpoolman boazpoolman self-requested a review June 17, 2023 21:50
@boazpoolman boazpoolman self-assigned this Jun 17, 2023
const fullFilePath = `${strapi.config.get('plugin.config-sync.syncDir')}${fileName}`
const stats = fs.statSync(fullFilePath);

const result = await strapi.plugins.upload.services.upload.upload({
Copy link
Member

Choose a reason for hiding this comment

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

Uploading through the upload plugin makes the zip file publically accessible.
That would be a security risk as there may be sensitive data in the /config/sync directory.

Is there a way we can download the zip from memory, instead of writing it to the disk first?

@reslear
Copy link

reslear commented Feb 3, 2024

Hi everyone, any updates ?)

@boazpoolman
Copy link
Member

This feature is not a priority for me right now.

I've put some feedback on this PR.
If anybody wishes to fix that feedback I'll be happy to merge and release this to NPM.

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.

Dowload config
3 participants