Class: Bizside::CarrierwaveStringIO
- Defined in:
- lib/bizside/carrierwave.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#file_size ⇒ Object
Returns the value of attribute file_size.
-
#original_filename ⇒ Object
Returns the value of attribute original_filename.
Attributes inherited from StringIO
Instance Method Summary collapse
Methods inherited from StringIO
#initialize, #original_dirname, #relative_dirname
Constructor Details
This class inherits a constructor from Bizside::StringIO
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
11 12 13 |
# File 'lib/bizside/carrierwave.rb', line 11 def content_type @content_type end |
#file_size ⇒ Object
Returns the value of attribute file_size.
12 13 14 |
# File 'lib/bizside/carrierwave.rb', line 12 def file_size @file_size end |
#original_filename ⇒ Object
Returns the value of attribute original_filename.
10 11 12 |
# File 'lib/bizside/carrierwave.rb', line 10 def original_filename @original_filename end |
Instance Method Details
#path ⇒ Object
14 15 16 17 18 19 |
# File 'lib/bizside/carrierwave.rb', line 14 def path # Return non-existent path to prevent any actual file/directory from being the target of copy or move # because this class does not refer to any file. # (CarrierWave::Uploader::Base#cache! tries to copy or move a passed file to its working directory) File.join(CarrierWave.tmp_path, SecureRandom.uuid, File.basename(original_filename)) end |