Class: Spider::UploadedFile
- Defined in:
- lib/spiderfw/http/http.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
aggiunto encoding per problemi con upload file “xFF” from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError).
-
#encoding ⇒ Object
readonly
aggiunto encoding per problemi con upload file “xFF” from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError).
-
#filename ⇒ Object
readonly
aggiunto encoding per problemi con upload file “xFF” from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError).
Instance Method Summary collapse
-
#initialize(filename, content_type, encoding) ⇒ UploadedFile
constructor
A new instance of UploadedFile.
Constructor Details
#initialize(filename, content_type, encoding) ⇒ UploadedFile
Returns a new instance of UploadedFile.
323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/spiderfw/http/http.rb', line 323 def initialize(filename, content_type, encoding) @filename = filename @content_type = content_type @encoding = encoding if RUBY_VERSION =~ /^1.9.3/ super('uploaded', Spider.paths[:tmp], content_type, :encoding => encoding) elsif RUBY_VERSION =~ /^1.8.7/ #caso con ruby 1.8.7 super('uploaded', Spider.paths[:tmp]) else super('uploaded', Spider.paths[:tmp], :encoding => encoding) end end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
aggiunto encoding per problemi con upload file “xFF” from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
321 322 323 |
# File 'lib/spiderfw/http/http.rb', line 321 def content_type @content_type end |
#encoding ⇒ Object (readonly)
aggiunto encoding per problemi con upload file “xFF” from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
321 322 323 |
# File 'lib/spiderfw/http/http.rb', line 321 def encoding @encoding end |
#filename ⇒ Object (readonly)
aggiunto encoding per problemi con upload file “xFF” from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
321 322 323 |
# File 'lib/spiderfw/http/http.rb', line 321 def filename @filename end |