presign put url

This block is part of the object storage group and was last modified in core v15.0.1.

presign put url v15.0.1

Creates a temporary URL that lets a browser upload one object directly to storage, without the file passing through this server. Not available in a simulation : the URL is a real credential.

In pins 5 + flow
  • flow
    flow
  • connection required
    s3connection

    The object storage connection to use, from an open connection block.

  • bucket
    value

    Bucket name. Leave empty to use the bucket set on the connection.

  • key required
    value

    The object key the URL should grant write access to.

  • expires in (seconds)
    number

    How long the URL stays valid. Defaults to 900 (15 minutes); the maximum SigV4 allows is 604800 (7 days).

    Default 900

  • content type
    value

    Strongly recommended. The uploader must send exactly this Content-Type, which stops the URL being used to store something else.

Out pins 6 + flow
  • flow
    flow
  • connection
    s3connection

    The same connection, so it can be passed to the next block.

  • success
    condition
  • error
    value
  • url
    value

    The signed URL. Anyone holding it has this access until it expires.

  • expires at
    date

    RFC-3339 timestamp at which the URL stops working.

  • expires in
    number

    Lifetime in seconds, as applied.

Builds a time-limited URL granting anonymous WRITE of `bucket`/`key`, for direct browser-to-storage uploads. Makes NO network call : pure signing : but is SUPPRESSED in a simulation anyway: minting anonymous write access to a live bucket is a real effect that outlives the dry run, and simulating is a lower bar than a production run. The signature covers the method and the key, so the holder cannot READ with it and cannot write anywhere else. It does NOT cover the body : that is what makes a browser upload possible : so the holder may store ANY BYTES at that key until it expires. Keep `expires_in` short and the key specific. Setting `content_type` BINDS the uploader: the request must carry exactly that Content-Type or the gateway refuses it. That is what stops a URL issued for an image being used to park an HTML document that then serves from the bucket's own origin : set it whenever the URL leaves the server. Default 900s, maximum 604800s (7 days); a larger value is refused, not clamped. success=false with NO_CONNECTION, MISSING_BUCKET, MISSING_KEY, or an out-of-range expiry.

s3 presign upload
direct upload
signed upload url
presigned put

Version history

Introduced in v15.0.1.


Back to object storage Return to the main group to view all sub-groups Back to object storage Return to the group to view all blocks within this group