lib/carrierwave/uploader/cache.rb in dsturnbull-carrierwave-0.4.5 vs lib/carrierwave/uploader/cache.rb in dsturnbull-carrierwave-0.4.6
- old
+ new
@@ -123,22 +123,18 @@
def cache_path
File.expand_path(File.join(cache_dir, cache_name), root)
end
- attr_reader :cache_id, :original_filename
+ attr_reader :cache_id
+ attr_accessor :original_filename
# We can override the full_original_filename method in other modules
alias_method :full_original_filename, :original_filename
def cache_id=(cache_id)
raise CarrierWave::InvalidParameter, "invalid cache id" unless cache_id =~ /\A[\d]{8}\-[\d]{4}\-[\d]+\-[\d]{4}\z/
@cache_id = cache_id
- end
-
- def original_filename=(filename)
- raise CarrierWave::InvalidParameter, "invalid filename" unless filename =~ /\A[a-z0-9\.\-\+_]+\z/i
- @original_filename = filename
end
end # Cache
end # Uploader
end # CarrierWave