client.files.post_multipart

A method of the Files endpoint.

post_multipart(name: str, num_parts: int, *, expires_at: str = None, description: str = None) Response

Initiate a multipart upload

API URL: POST /files/multipart

import civis
client = civis.APIClient()
response = client.files.post_multipart(...)
Parameters:
namestr

The file name.

num_partsint

The number of parts in which the file will be uploaded. This parameter determines the number of presigned URLs that are returned.

expires_atstr (date-time), optional

The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.

descriptionstr, optional

The user-defined description of the file.

Returns:
civis.Response
  • idint

    The ID of the file.

  • namestr

    The file name.

  • created_atstr (date-time)

    The date and time the file was created.

  • file_sizeint

    The file size.

  • expires_atstr (date-time)

    The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.

  • descriptionstr

    The user-defined description of the file.

  • upload_urlsList[str]

    An array of URLs that may be used to upload file parts. Use separate PUT requests to complete the part uploads. Links expire after 12 hours.