Models uploaded files.
The actual file is accessible via the tempfile accessor, though some of its interface is available directly for convenience.
Uploaded files are temporary files whose lifespan is one request. When the object is finalized Ruby unlinks the file, so there is no need to clean them with a separate maintenance task.
Shortcut for tempfile.close.
# File lib/action_dispatch/http/upload.rb, line 45 def close(unlink_now=false) @tempfile.close(unlink_now) end
Shortcut for tempfile.eof?.
# File lib/action_dispatch/http/upload.rb, line 65 def eof? @tempfile.eof? end
Shortcut for tempfile.open.
# File lib/action_dispatch/http/upload.rb, line 40 def open @tempfile.open end
Shortcut for tempfile.path.
# File lib/action_dispatch/http/upload.rb, line 50 def path @tempfile.path end
Shortcut for tempfile.read.
# File lib/action_dispatch/http/upload.rb, line 35 def read(length=nil, buffer=nil) @tempfile.read(length, buffer) end
Generated with the Darkfish Rdoc Generator 2.