User uploaded files that need to remain on site

So on our site that we will be deploying with Octopus, we allow users to upload images to it and right now when they upload these images we store them in a structure like siteroot\public\img\logo-48 and siteroot\public\img\logo-96.

If we were to deploy the site using Octopus, those images would disappear on the site in the sense that if we deploy a version 1.0.0.1 and images are uploaded at that time, they will exist in that 1.0.0.1 version folder in the Octopus data folder, and then when we update the site to version 1.0.0.2, those images will no longer exist as far as the version 1.0.0.2 site is concerned.

Has anyone run into an issue like this before and been able to solve it outside of moving that folder outside of the site root or does anyone have any ideas on if I can somehow look in the previous versions folder to find them and copy them into the new version maybe?

Any help/suggestions would be much appreciated!

Hi Ben,

There’s a “Custom installation directory” feature that you can enable during package deployment to specify that you want Octopus to always deploy the package to a specific folder rather than creating a new folder each time. Most people use that.

Alternatively yes, moving the folder outside of the application root is a good solution.

Paul

Thanks Paul. I think we are going to go with having the images in another location outside the application root and create a pre-deployment script that will move them to the new location for us as part of the next deployment.