docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CreateFileAttachmentRequest

    Represents a request to create a file attachment for an annotation.

    Inheritance
    object
    CreateFileAttachmentRequest
    Implements
    ICreateFileAttachmentRequest
    ICreateAttachmentRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Collaboration.Models.AttachmentRequest
    Assembly: Unity.Cloud.Collaboration.dll
    Syntax
    [DataContract(Name = "assets.CreateNewAnnotationAttachmentRequest")]
    public class CreateFileAttachmentRequest : ICreateFileAttachmentRequest, ICreateAttachmentRequest

    Constructors

    CreateFileAttachmentRequest(string, Dictionary<string, object>, long, string, string)

    Initializes a new instance of the CreateFileAttachmentRequest class.

    Declaration
    public CreateFileAttachmentRequest(string filePath, Dictionary<string, object> metadata = null, long fileSize = 0, string fileType = null, string contentType = null)
    Parameters
    Type Name Description
    string filePath

    The file path of the attachment (required).

    Dictionary<string, object> metadata

    The metadata associated with the file attachment.

    long fileSize

    The size of the file in bytes.

    string fileType

    The file type of the attachment.

    string contentType

    The content type (MIME type) of the file.

    Properties

    ContentType

    The file content type, MIME type if relevant This should match the MIME type of the file if it exists. https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types"

    Declaration
    public string ContentType { get; }
    Property Value
    Type Description
    string

    FilePath

    A simple filename or a relative path to a target directory for the attachment Examples:

    • "image.jpeg"
    • "test/assets/image.jpeg"
    Declaration
    public string FilePath { get; }
    Property Value
    Type Description
    string

    FileSize

    The file size

    Declaration
    public long FileSize { get; }
    Property Value
    Type Description
    long

    FileType

    The file type Examples:

    • "image"
    • "video"
    • "audio"
    • "text"
    • "3D model"
    • "Other"
    Declaration
    public string FileType { get; }
    Property Value
    Type Description
    string

    Metadata

    Metadata for the Attachment

    Declaration
    public Dictionary<string, object> Metadata { get; }
    Property Value
    Type Description
    Dictionary<string, object>

    Type

    The type of the Attachment, this should be used to identify the specific type of Attachment given

    Declaration
    public string Type { get; }
    Property Value
    Type Description
    string

    Implements

    ICreateFileAttachmentRequest
    ICreateAttachmentRequest
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)