Sha256: 1aca77beb3c8b50a9bf2d25fc6f331e8dbff74bc1ccff3002ff4251be06ec2b0

Contents?: true

Size: 437 Bytes

Versions: 5

Compression:

Stored size: 437 Bytes

Contents

module Coupler
  class DataUploader < CarrierWave::Uploader::Base
    def store_dir
      Base.settings.upload_path
    end

    def cache_dir
      File.join(store_dir, 'tmp')
    end

    def filename
      if @filename
        @stored_filename ||= @filename.sub(/\..+?$/, "") + '-' + Digest::SHA1.hexdigest([@filename,
          Time.now.utc, rand].join) + File.extname(@filename)
      else
        super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
coupler-0.0.6-java lib/coupler/data_uploader.rb
coupler-0.0.4-java lib/coupler/data_uploader.rb
coupler-0.0.3-java lib/coupler/data_uploader.rb
coupler-0.0.2-java lib/coupler/data_uploader.rb
coupler-0.0.1-java lib/coupler/data_uploader.rb