Action Dispatch HTTP UploadedFile
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.
Attributes
[RW] | content_type | A string with the MIME type of the file. |
[RW] | headers | A string with the headers of the multipart request. |
[RW] | original_filename | The basename of the file in the client. |
[RW] | tempfile | A |
Instance Public methods
close(unlink_now = false) Link
Shortcut for tempfile.close
.
eof?() Link
Shortcut for tempfile.eof?
.
open() Link
Shortcut for tempfile.open
.
path() Link
Shortcut for tempfile.path
.
read(length = nil, buffer = nil) Link
Shortcut for tempfile.read
.
rewind() Link
Shortcut for tempfile.rewind
.
size() Link
Shortcut for tempfile.size
.