Class UploadedFile
[Serializable]
public class UploadedFile : IUploadedFile, IProviderData, IData
- Inheritance
-
objectUploadedFile
- Implements
-
IData
- Extension Methods
Fields
api
public Api api
Field Value
byteSize
public int byteSize
Field Value
- int
createdAt
public UnixTime createdAt
Field Value
- UnixTime
expiresAt
public UnixTime expiresAt
Field Value
- UnixTime
id
public string id
Field Value
- string
metadata
public SerializableMetadata metadata
Field Value
- SerializableMetadata
mimeType
public MimeType mimeType
Field Value
- MimeType
name
public string name
Field Value
- string
uri
public string uri
Field Value
- string
Properties
Api
public Api Api { get; }
Property Value
ByteSize
Gets the total size of the file in bytes.
- Useful for validating upload/download sizes.
- May differ depending on provider’s storage format.
public int ByteSize { get; }
Property Value
- int
CreatedAt
Gets the timestamp of when the file was created on the provider’s system.
- Uses UnixTime for consistency across APIs.
- Often represents the original upload time.
public UnixTime CreatedAt { get; }
Property Value
- UnixTime
ExpiresAt
Gets the timestamp when the file will expire (if applicable).
- Some providers set expiration dates for temporary files.
- May return
nullif the file does not expire.
public UnixTime ExpiresAt { get; }
Property Value
- UnixTime
Id
public string Id { get; }
Property Value
- string
Metadata
public SerializableMetadata Metadata { get; }
Property Value
- SerializableMetadata
MimeType
Gets the MIME type of the file as detected or declared during upload.
- Examples:
application/json,image/png,audio/wav. - Can be used to determine how to process or preview the file.
public MimeType MimeType { get; }
Property Value
- MimeType
Name
public string Name { get; }
Property Value
- string
Uri
Gets the URI where the file can be accessed, if provided by the API.
- Default implementation returns
null. - Some providers return a signed URL or permanent link.
public string Uri { get; }
Property Value
- string
Methods
Equals(UploadedFile)
public bool Equals(UploadedFile other)
Parameters
otherUploadedFile
Returns
- bool
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetMetadata()
Builds a serializable metadata object for this file.
- Encapsulates file properties for persistence or logging.
- Useful for caching file data locally or transmitting through APIs.
public SerializableMetadata GetMetadata()
Returns
- SerializableMetadata