Class: TD::Types::RemoteFile
- Defined in:
- lib/tdlib/types/remote_file.rb
Overview
Represents a remote file.
Instance Attribute Summary collapse
-
#id ⇒ String?
Remote file identifier; may be empty.
-
#is_uploading_active ⇒ Boolean
True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
-
#is_uploading_completed ⇒ Boolean
True, if a remote copy is fully available.
-
#uploaded_size ⇒ Integer
Size of the remote available part of the file; 0 if unknown.
Method Summary
Methods inherited from Base
Instance Attribute Details
#id ⇒ String?
Remote file identifier; may be empty. Can be used across application restarts or even from other devices for the current user. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending Update::FileGenerationStart to the client with the HTTP URL in the original_path and "#url#" as the conversion string. Clients should generate the file by downloading it to the specified location.
16 17 18 |
# File 'lib/tdlib/types/remote_file.rb', line 16 def id @id end |
#is_uploading_active ⇒ Boolean
True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
16 17 18 |
# File 'lib/tdlib/types/remote_file.rb', line 16 def is_uploading_active @is_uploading_active end |
#is_uploading_completed ⇒ Boolean
True, if a remote copy is fully available.
16 17 18 |
# File 'lib/tdlib/types/remote_file.rb', line 16 def is_uploading_completed @is_uploading_completed end |
#uploaded_size ⇒ Integer
Size of the remote available part of the file; 0 if unknown.
16 17 18 |
# File 'lib/tdlib/types/remote_file.rb', line 16 def uploaded_size @uploaded_size end |