Carrierwave fog local storage full attachment path
<p>I am building a rails app with carrierwave and fog for attachment storage. In my test environment, I am using fog local storage. </p>

<p>I am looking for a way to get the full attachment path with this configuration.</p>

<pre><code>CarrierWave.configure do |config|
  config.fog_credentials = {
    provider:               'Local',
    local_root:             '/Users/me/fog',
    endpoint:               '/Users/me/fog',
  }

  config.fog_directory  = 'test.myapp.com
  config.fog_public     = false
  config.fog_attributes = { 'Cache-Control' =&gt; 'max-age=315576000' }
end
</code></pre>

<p>When I use any other storage options (like AWS S3), I can get the full url to an attachment just by doing <code>my_object.my_attachment_url</code> or <code>my_object.my_attachment.path</code>.</p>

<p>However, when using <code>Local</code> storage, I only get a relative path to my configuration options like <code>my_object/my_attachment/1/test.jpg</code>.</p>

<p>Is there any way through carrierwave or fog to get the full path to this local file?</p>

<p>For my example, the output I am looking for would be: <code>/Users/me/fog/test.myapp.com/my_object/my_attachment/1/test.jpg</code></p>