Answers.Body: <p>We created a plugin to help solve this problem:
  <a href="https://github.com/Firstborn/Craft-CMS-Environment-Settings" rel="nofollow noreferrer">https://github.com/Firstborn/Craft-CMS-Environment-Settings</a></p>
  
  <p>This plugin allows you to specify different configurations per environment on a single asset source.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-19T16:16:14.863Z
Answers.LastActivityDate: 2018-04-19T16:16:14.863Z
Answers.UserDisplayName: Ziad Hilal
Body: <p>I'm looking to pull assets from a local folder when developing locally, and an S3 folder when on staging/production.</p>
  
  <p>Is this possible? It looks like no, but I'm hoping that's not the definitive answer: <a href="https://craftcms.stackexchange.com/questions/15190/multi-environment-s3-asset-paths">Multi-Environment S3 Asset Paths</a></p>
  
  <p>It appears you can't alter the asset 'type'. However, I've seen configs (specifically, this one: <a href="https://designkarma.co.uk/blog/localization-multi-environment-setup-in-craft" rel="nofollow noreferrer">https://designkarma.co.uk/blog/localization-multi-environment-setup-in-craft</a>) that seem to use different urls for local vs s3 assets. That gets rid of the ability to set a cache duration and other s3 specific options, however.</p>
  
  <p>Is the only real way to do this is to set CORS settings on the S3 folder to allow connections from a local development URL, and use that for local/staging, and another bucket/config for production?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-25T08:06:29.903Z
Comments.Text: There are a lot of potential issues here. Assets need to be indexed before they can be used and Assets relies on that index. If you make changes to Assets outside of Craft, Craft won't know about those changes. Same if you make changes to Assets on a local Craft install - unless you push the DB as well. So, all of this leads me to this question - what's wrong with just using two different S3 buckets?
Comments.UserDisplayName: Andris Sevcenko
Tags: <assets><multi-environment><s3>
Title: Local vs Amazon S3 asset paths in multi-environment config
ThreadText: # Local vs Amazon S3 asset paths in multi-environment config
  
  (Asked by: username_0 on 2017-08-24)
  
  I'm looking to pull assets from a local folder when developing locally, and an S3 folder when on staging/production.
  
  Is this possible? It looks like no, but I'm hoping that's not the definitive answer: [Multi-Environment S3 Asset Paths](https://craftcms.stackexchange.com/questions/15190/multi-environment-s3-asset-paths)
  
  It appears you can't alter the asset 'type'. However, I've seen configs (specifically, this one: <https://designkarma.co.uk/blog/localization-multi-environment-setup-in-craft>) that seem to use different urls for local vs s3 assets. That gets rid of the ability to set a cache duration and other s3 specific options, however.
  
  Is the only real way to do this is to set CORS settings on the S3 folder to allow connections from a local development URL, and use that for local/staging, and another bucket/config for production?
  
  **Tags:** assets, multi-environment, s3
  
  > **Comments:**
  > **username_1**: There are a lot of potential issues here. Assets need to be indexed before they can be used and Assets relies on that index. If you make changes to Assets outside of Craft, Craft won't know about those changes. Same if you make changes to Assets on a local Craft install - unless you push the DB as well. So, all of this leads me to this question - what's wrong with just using two different S3 buckets?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-04-19. Score: 2
  
  We created a plugin to help solve this problem:
  <https://github.com/Firstborn/Craft-CMS-Environment-Settings>
  
  This plugin allows you to specify different configurations per environment on a single asset source.
  
  
  ---
  
  