Net::API::Gett::File - Gett file object
Encapsulate Gett files. You normally shouldn't instantiate this class on its own, as the library will create and return this object as appropriate.
These are read only attributes unless otherwise noted.
Scalar integer. The number of times this particular file has been downloaded
Scalar string. Signifies the state a particular file is in. See the Gett developer docs for more information.
Scalar string. The URL to use in a browser to access a file.
Scalar string. The URL to use to get the file contents.
Scalar integer. The size in bytes of this file.
The Unix epoch time when this file was created in Gett.
This value is suitable for use in
Scalar string. The share in which this file lives inside.
Scalar string. The url to use to upload the contents of this file using the PUT method. (This attribute is only populated during certain times.)
Scalar string. This url to use to upload the contents of this file using the POST method. (This attribute is only populated during certain times.)
Scalar integer. This is the chunk size to use for file uploads. It defaults to 1,048,576 bytes (1 MB). This attribute is read-only.
This method actually uploads the file to the Gett service.
This method is normally invoked by the
but it might be useful in combination with
It takes the following parameters:
a scalar representing the file contents which can be one of: a buffer, an IO::Handle object, or a file pathname.
an encoding scheme.
The maximum chunksize to load into to memory at one time. If the file to transmit is larger than this size, it will be dynamically streamed.
Returns a true value on success.
This method returns a scalar PUT upload URL for the specified sharename/fileid parameters.
Potentially useful in combination with
This method destroys the file represented by the object. Returns a true value on success.
This method retrieves the contents of a this file in the Gett service. You are responsible for outputting the file (if desired) with any appropriate encoding. Does not require an access token.
This method returns a thumbnail if the file in Gett is an image. Does not require an access token, but is really only meaningful if the data is a valid image format file.