Class UploadedFile
Serializable implementation of IUploadedFile used by the SDK.
Stores provider file metadata in a Unity-friendly form for runtime and editor workflows.
Assembly: Glitch9.AIDevKit.dll
Syntax
[Serializable]
public sealed class UploadedFile : IUploadedFile, IAIResource, IData, IHasId<string>, IHasName, IDeprecatable
Fields
|
Edit this page
View Source
api
Provider identifier that owns this file.
Declaration
[SerializeField]
public Api api
Field Value
|
Edit this page
View Source
byteSize
Declaration
[SerializeField]
[FormerlySerializedAs("bytes")]
public int byteSize
Field Value
|
Edit this page
View Source
createdAt
Provider creation timestamp.
Declaration
[SerializeField]
[FormerlySerializedAs("created")]
public UnixTime createdAt
Field Value
|
Edit this page
View Source
expiresAt
Provider expiration timestamp.
Declaration
[SerializeField]
public UnixTime expiresAt
Field Value
|
Edit this page
View Source
id
Provider-side unique file id.
Declaration
[SerializeField]
public string id
Field Value
|
Edit this page
View Source
Additional provider-specific metadata.
Declaration
[SerializeField]
public SerializableMetadata metadata
Field Value
|
Edit this page
View Source
mimeType
Detected or declared MIME type.
Declaration
[SerializeField]
public MimeType mimeType
Field Value
|
Edit this page
View Source
name
Human-readable file name, if available.
Declaration
[SerializeField]
public string name
Field Value
|
Edit this page
View Source
uri
Provider file URL (may be temporary or signed).
Declaration
[SerializeField]
public string uri
Field Value
Properties
|
Edit this page
View Source
Api
Declaration
Property Value
|
Edit this page
View Source
ByteSize
Gets the file size in bytes.
This value is useful for validating upload/download limits and storage usage.
Declaration
public int ByteSize { get; }
Property Value
|
Edit this page
View Source
CreatedAt
Declaration
public UnixTime? CreatedAt { get; }
Property Value
|
Edit this page
View Source
ExpiresAt
Gets the file expiration timestamp, if the provider defines one.
Returns null when the file has no expiration policy.
Declaration
public UnixTime? ExpiresAt { get; }
Property Value
|
Edit this page
View Source
Id
Declaration
public string Id { get; }
Property Value
|
Edit this page
View Source
Declaration
public SerializableMetadata Metadata { get; }
Property Value
|
Edit this page
View Source
MimeType
Gets the MIME type associated with the file.
This can be used to select preview, parsing, or processing paths.
Declaration
public MimeType MimeType { get; }
Property Value
|
Edit this page
View Source
Name
Gets the name of this object.
Declaration
public string Name { get; }
Property Value
|
Edit this page
View Source
Uri
Gets a provider URL for this file, if available.
Some providers expose signed URLs while others may return no URL.
Declaration
public string Uri { get; }
Property Value
Methods
|
Edit this page
View Source
CreateWithId(string)
Creates a lightweight uploaded-file instance with only the file id populated.
Useful when an API expects a file reference and full metadata is not required.
Declaration
public static IUploadedFile CreateWithId(string fileId)
Parameters
| Type |
Name |
Description |
| string |
fileId |
Provider file id.
|
Returns
Exceptions
|
Edit this page
View Source
Equals(UploadedFile)
Compares this instance with another UploadedFile for value equality.
Equality is based on id, name, byte size, and creation timestamp.
Declaration
public bool Equals(UploadedFile other)
Parameters
Returns
|
Edit this page
View Source
Equals(object)
Compares this instance with another object for value equality.
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Returns a hash code consistent with the value-equality members.
Declaration
public override int GetHashCode()
Returns
Overrides
Implements
Extension Methods