Search Results for

    Show / Hide Table of Contents

    Method UploadFileBytes

    UploadFileBytes(String, String, Byte[], Int32)

    Upload file bytes

    Declaration
    string UploadFileBytes(string connectionId, string fileId, byte[] bytes, int from)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    System.String fileId

    Optional: The file id. Just fill with the return value of this method if you are uploading with junks. Otherwise should be null.See also UploadFileBytes(String, String, Byte[], Int32)

    System.Byte[] bytes

    Bytes to write

    System.Int32 from

    Optional: The zero-based byte offset. Default: 0

    Returns
    Type Description
    System.String

    Returns a unique file id

    Examples

    POST http://YourServerName/InfoShare/Json/File/UploadFileBytes

    Example for upload file bytes.

    {
       "connectionId": "bbf760ba-6bdb-45b6-9eec-992669fc7359",
       "fileId": "",
       "bytes": [37,80,68,70,45,49,46,53,13,10,37,181,181,181,181,13,10,49,32,48,32,111,
        98,106,13,10,60,60,47,84,121,112,101,47,67,97,116,97,108,111,103,47,80,97,23,68,69,41,32,47,83,116,114 ....],
       "from": "0"
    }

    Response:

    {
       "UploadFileBytesResult": "b769391c-f060-e911-a8bb-00155d290a08"
    }
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    Verification code is needed: Verification code not yet verified (10152)

    Back to top Copyright © Kendox