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

How to handle uploads files ? #125

Open
saperlipopette45 opened this issue Jun 23, 2021 · 1 comment
Open

How to handle uploads files ? #125

saperlipopette45 opened this issue Jun 23, 2021 · 1 comment

Comments

@saperlipopette45
Copy link

Hello, I am using easy-deploy-bundle in my project, and recently I added file upload to my website. So I store files under current/public/uploads directory. But when I deploy a new release of my projects, I loose all of the files under the current/public/uploads directory (since easydeploy creates a new one). Is there an option which handles this case ?

Thanks in advance

@fd6130
Copy link

fd6130 commented Sep 4, 2021

Hello, I am using easy-deploy-bundle in my project, and recently I added file upload to my website. So I store files under current/public/uploads directory. But when I deploy a new release of my projects, I loose all of the files under the current/public/uploads directory (since easydeploy creates a new one). Is there an option which handles this case ?

Thanks in advance

You can set it as share folder in deploy.php:

    public function configure()
    {
        return $this->getConfigBuilder()
             // ....
            ->sharedFilesAndDirs(['public/uploads'])
        ;
    }

After deploy to server, you have two choice:

  1. If your uploads folder contains lots of files, just copy your uploads folder to the shared directory created by deployer.
  2. Or create a new uploads folder in the shared directory created by deployer.

so next time you can just deploy a new release without worrying the uploads folder.

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

No branches or pull requests

2 participants