← All procedures

s3.multipart.init

Initialize multipart upload for large files

CLI
Package
@procedures/s3 · README
Path
["s3","multipart","init"]
CLI
mark s3 multipart init --bucket <string> --key <string>
As data
{"$proc":["s3","multipart","init"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/s3"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["s3","multipart","init"], { bucket: "<bucket>", key: "<key>" });
console.log(JSON.stringify(result));

From the command line

$ mark s3 multipart init --bucket <string> --key <string>

As data, in a program

{
  "$proc": ["s3", "multipart", "init"],
  "input": { "bucket": "<bucket>", "key": "<key>" }
}

Input

FieldTypeRequiredDefaultDescription
bucketstringyesS3 bucket name
keystringyesObject key (path in bucket)
contentTypestringnoContent type
metadataobjectnoOptional metadata

Output

FieldTypeRequiredDefaultDescription
uploadIdstringyesThe upload id: the part uploads and complete take it
bucketstringyesThe bucket
keystringyesThe object key
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "bucket": {
        "type": "string",
        "description": "S3 bucket name"
      },
      "key": {
        "type": "string",
        "description": "Object key (path in bucket)"
      },
      "contentType": {
        "description": "Content type",
        "type": "string"
      },
      "metadata": {
        "description": "Optional metadata",
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "string"
        }
      }
    },
    "required": [
      "bucket",
      "key"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "uploadId": {
        "type": "string",
        "description": "The upload id: the part uploads and complete take it"
      },
      "bucket": {
        "type": "string",
        "description": "The bucket"
      },
      "key": {
        "type": "string",
        "description": "The object key"
      }
    },
    "required": [
      "uploadId",
      "bucket",
      "key"
    ],
    "additionalProperties": {}
  }
}