cofoundry icon indicating copy to clipboard operation
cofoundry copied to clipboard

Image Save Location

Open ArcaneTSGK opened this issue 5 years ago • 3 comments

We currently have an instance of our CMS deployed to AWS EC2 via CodeDeploy, during this process the application is removed from the server with the latest version of the application being deployed.

This of course removes everything under App_Data, meaning all image files on the server are lost on every deployment.

Is there a way to configure the image upload in CoFoundry to save the images to another location, ideally this would be a separate drive on the server, or at the very least a directory outside of the application?

ArcaneTSGK avatar May 14 '19 08:05 ArcaneTSGK

There's two ways you could resolve this, one is to change the Cofoundry:FileSystemFileStorage:FileRoot setting e.g.

appsettings.json

{
  "Cofoundry": {
    "FileSystemFileStorage:FileRoot": "F:\\Files\\MySite",
  }
}

The other method would be to use a plugin like Cofoundry.Plugins.Azure if you were using Azure, which would allow you to use blob storage. Unfortunately there's no S3 equivalent plugin at the moment, but I think it would be fairly easy to create one if you wanted to go down that route, all you'd need to do is create an IFileStoreService implementation and register it to override the base implementation

We should add some documentation on this either in the deployment docs or the assets docs

HeyJoel avatar May 14 '19 08:05 HeyJoel

Thank you for your quick response, would you like me to leave this issue open for now as a reminder to add documentation?

Cheers!

ArcaneTSGK avatar May 14 '19 08:05 ArcaneTSGK

Yes please, I think we need to update the docs.

HeyJoel avatar May 14 '19 08:05 HeyJoel

Documentation complete, will be published with the v0.12 release.

HeyJoel avatar Apr 04 '24 09:04 HeyJoel