create_file_upload

Create a file upload.

Input fields

byte_size (BigInt!)

File size in bytes.

checksum (String!)

MD5 file checksum as base64.

content_type (String!)

File content type.

create_file (Boolean)

Whether to create a file record for this upload. If false or omitted, no file record will be created.

file_type (FileType)

The type of file being uploaded. Required when create_file is true.

file_upload_owner (FileUploadOwnerInput)

Information required to create an owner of this file.

filename (String!)

Name to give this file.

Return fields

file_sentera_id (ID)

The Sentera ID of the created file

headers (JSON!)

HTTP request headers

id (ID!)

ID of the file metadata

owner_sentera_id (ID)

The Sentera ID of the owner of the file upload

s3_url (String)

The s3 url, which requires AWS credentials when downloading the file

upload_url (String!)

Presigned URL to upload a file to s3

url (String!)
Deprecation notice

Please use upload_url instead

Upload URL

Examples

Create File Upload

Request credentials to upload a file to Sentera's cloud storage.
If you are uploading for import_mosaics then you need image/tiff.

Try this example in GraphiQL
mutation CreateFileUpload{
  create_file_upload(
    filename: "test.geojson"
    content_type: "application/geo+json"
    byte_size: 480452
    checksum: "R1DTObliXS7goESYAqrAOQ=="
  ) {
    id
    upload_url
    headers
  }
}

{
  "data": {
    "create_file_upload": {
      "id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMFpLQVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--1cadf0aeac8ac03c730ef549710be2e79accdc6c",
      "upload_url": "https://cloudvault-prod-import.s3.us-west-2.amazonaws.com/rq7eh5z7kema07lr011zrx58a6eb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJOTRNP3QHKMDZANQ%2F20201106%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20201106T183828Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=content-length%3Bcontent-md5%3Bcontent-type%3Bhost&X-Amz-Signature=a034f856bf414d7a4a61e2be1efc2c62e6e45c179b8df1830bef77474ca7fe12",
      "headers": {
        "Content-Type": "application/geo+json",
        "Content-MD5": "R1DTObliXS7goESYAqrAOQ=="
      }
    }
  }
}

Create File Upload for an Owner

Request credentials to upload a file to Sentera's cloud storage.
If you are uploading for import_mosaics then you need image/tiff.
More Details

Try this example in GraphiQL
mutation CreateFileUploadForOwner{
  create_file_upload(
    filename: "test.geojson"
    content_type: "application/geo+json"
    byte_size: 480452
    checksum: "R1DTObliXS7goESYAqrAOQ=="
    file_upload_owner: {
      parent_sentera_id: "7hy7bwv_CO_cyscAcme_CV_deve_6e3c36d3f_220308_135409"
      owner_type: FEATURE_SET
      owner_sentera_id: "w3x63n1_FS_cyscAcme_CV_deve_6e3c36d3f_220308_135411"
    }
  ) {
    id
    upload_url
    headers
    s3_url
    owner_sentera_id
  }
}

{
  "data": {
    "create_file_upload": {
      "id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMFpLQVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--1cadf0aeac8ac03c730ef549710be2e79accdc6c",
      "upload_url": "https://cloudvault-prod-import.s3.us-west-2.amazonaws.com/rq7eh5z7kema07lr011zrx58a6eb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJOTRNP3QHKMDZANQ%2F20201106%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20201106T183828Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=content-length%3Bcontent-md5%3Bcontent-type%3Bhost&X-Amz-Signature=a034f856bf414d7a4a61e2be1efc2c62e6e45c179b8df1830bef77474ca7fe12",
      "headers": {
        "Content-Type": "application/geo+json",
        "Content-MD5": "R1DTObliXS7goESYAqrAOQ=="
      },
      "s3_url": "s3://cloudvault-prod-permanent/cyscAcme/m0t9fcg_AS_cyscAcme_CV_deve_6e3c36d3f_220308_135409/7hy7bwv_CO_cyscAcme_CV_deve_6e3c36d3f_220308_135409/FeatureSets/w3x63n1_FS_cyscAcme_CV_deve_6e3c36d3f_220308_135411/test",
      "owner_sentera_id": "w3x63n1_FS_cyscAcme_CV_deve_6e3c36d3f_220308_135411"
    }
  }
}