Take the 2-minute tour ×
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It's 100% free, no registration required.

I am curious how those of you who use a multi-environment development process handle user upload directories? If you use a remote database and one developer uploads some test content, the shared database will think there are files on the other developers machine and they won't be there. This would also show its face if you access a staging server. The database would be out of sync with the upload directory.

Thanks for your input.

share|improve this question
    
Thanks for the feedback. I "think" I have found a pretty nifty solution to the problem. I have been using Amazon S3 as my assets source which solves the issue. I was recently thinking about switching back to local storage to see if there would be any performance gains but then I thought about the version control issue I asked about. Is anyone seeing any downsides to using Amazon S3 in this situation? By using that, everybody can upload/download and it all stays in sync with the shared development database. –  Jacob Graf Jul 16 at 21:37

2 Answers 2

up vote 2 down vote accepted

We use rsync. This can either be run manually with your CLI or you could set up a cron to run it every so often. It's significantly faster than FTP.

share|improve this answer
    
Which folders do you rsync with? –  Jacob Graf Jul 16 at 15:28
1  
This will depend a bit on how your environment structure is setup, but we just do public/uploads and then keep all Assets paths to that folder. Those are the only files that change on a remote environment that wouldn't otherwise be in our repo. –  Ryan Shrum Jul 16 at 15:31
    
So each of your developers sync to a central development server? –  Jacob Graf Jul 16 at 15:36
1  
Just in terms of the uploads; rsync is run to each dev's local setup. dropbox.com/s/o7u9w1ft2wi1zw8/rsync.jpg All the other files are handled via Git and go upwards –  Ryan Shrum Jul 16 at 15:54
    
For my own understanding: @RyanShrum When you say "repo", do you mean git repo? Are you excluding these files from your git repo? If so, why? If they were in git repo, couldn't each developer pull them down to respective local dev environments, and then the shared remote dev DB would know about them? –  Andrea DeMers Jul 16 at 15:57

I think Ryan's solution is the best, but since you're looking for other ways...

Transmit's sync feature works very well for user upload directories. Sync down or sync up as needed. I use this only for user upload directories (for me html/assets). Everything else is handled with Git, similar to the way Ryan described. I also gitignore the user upload directories (seems the wise thing to do).

Here is a screenshot of Transmit's sync dialogue.

Transmit sync dialogue

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.