Pyjo.Upload - Upload¶
import Pyjo.Upload
upload = Pyjo.Upload.new()
print(upload.filename)
upload.move_to('/home/pyjo/foo.txt')
Pyjo.Upload
is a container for uploaded files.
Classes¶
-
class
Pyjo.Upload.
Pyjo_Upload
(**kwargs)¶ Pyjo.Upload
inherits all attributes and methods fromPyjo.Base
and implements the following new ones.-
asset
= None¶ asset = upload.asset upload.asset = Pyjo.Asset.File.new()
Asset containing the uploaded data, usually a
Pyjo.Asset.File
orPyjo.Asset.Memory
object.
-
filename
= None¶ filename = upload.filename upload.filename = 'foo.txt'
Name of the uploaded file.
-
headers
= None¶ headers = upload.headers upload.headers = Pyjo.Headers.new()
Headers for upload, defaults to a
Pyjo.Headers
object.
-
move_to
(path)¶ upload = upload.move_to('/home/pyjo/foo.txt')
Move uploaded data into a specific file.
-
name
= None¶ name = upload.name upload.name = 'foo'
Name of the upload.
-
size
¶ size = upload.size
Size of uploaded data in bytes.
-
slurp
()¶ bstring = upload.slurp()
Read all uploaded data at once.
-
-
Pyjo.Upload.
object
¶ alias of
Pyjo_Upload