storage

Vercel Postgres, KV, Blob, and Edge Config

APACHE-2.0 License

Downloads
3.5M
Stars
453
Committers
27

Bot releases are visible (Hide)

storage - @vercel/[email protected]

Published by github-actions[bot] 9 months ago

Minor Changes

  • 898c14a: feat(blob): Add multipart option to reliably upload medium and large files

    It turns out, uploading large files using Vercel Blob has been a struggle for users.
    Before this change, file uploads were limited to around 200MB for technical reasons.
    Before this change, even uploading a file of 100MB could fail for various reasons (network being one of them).

    To solve this for good, we're introducting a new option to put and upload calls: multipart: true. This new option will make sure your file is uploaded parts by parts to Vercel Blob, and when some parts are failing, we will retry them. This option is available for server and client uploads.

    Usage:

    const blob = await put('file.png', file, {
      access: 'public',
      multipart: true, // `false` by default
    });
    
    // and:
    const blob = await upload('file.png', file, {
      access: 'public',
      handleUploadUrl: '/api/upload',
      multipart: true,
    });
    

    If your file is a Node.js stream or a ReadableStream then we will gradually read and upload it without blowing out your server or browser memory.

    More examples:

    import { createReadStream } from 'node:fs';
    
    const blob = await vercelBlob.put(
      'elon.mp4',
      // this works 👍, it will gradually read the file from the system and upload it
      createReadStream('/users/Elon/me.mp4'),
      { access: 'public', multipart: true },
    );
    
    const response = await fetch(
      'https://example-files.online-convert.com/video/mp4/example_big.mp4',
    );
    
    const blob = await vercelBlob.put(
      'example_big.mp4',
      // this works too 👍, it will gradually read the file from internet and upload it
      response.body,
      { access: 'public', multipart: true },
    );
    

Patch Changes

  • fd1781f: feat(blob): allow folder creation

    This allows the creation of empty folders in the blob store. Before this change the SDK would always require a body, which is prohibited by the API.
    Now the the SDK validates if the operation is a folder creation by checking if the pathname ends with a trailling slash.

    const blob = await vercelBlob.put('folder/', {
      access: 'public',
      addRandomSuffix: false,
    });
    
storage - @vercel/[email protected]

Published by github-actions[bot] 10 months ago

Patch Changes

  • ae0ba27: Ensure fetch is bound to globalThis
  • 5624237: fix(deps): Change jest-environment-jsdom to a devDependency.
storage - @vercel/[email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

storage - @vercel/[email protected]

Published by github-actions[bot] 11 months ago

Minor Changes

  • 26a2acb: feat(blob): throw specific error when service unavailable
storage - @vercel/[email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

  • f9c4061: fix(blob): Enforce content-type on fetch requests during token generation

    Before this change, we would not send the content-type header on fetch requests sent to your server during client uploads. We consider this a bugfix as it should have been sent before.

    ⚠️ If you upgrade to this version, and you're using any smart request body parser (like Next.js Pages API routes) then: You need to remove any JSON.parse(request.body) at the handleUpload step, as the body will be JSON by default now. This is valid for the onBeforeGenerateToken and onUploadCompleted steps.

storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Major Changes

storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Minor Changes

  • d57df99: Adds a new mode: folded | expanded (default) parameter to the list command options. When you pass folded to mode, then we automatically fold all files belonging to the same folder into a single folder entry. This allows you to build file browsers using the Vercel Blob API.
storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Minor Changes

  • a247635: feat(postgres-kysely): Allow passing Kysely options
storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Patch Changes

  • 4e8161a: chore(deps): update dependency @neondatabase/serverless to v0.6.0
  • Updated dependencies [4e8161a]
storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Patch Changes

  • 4e8161a: chore(deps): update dependency @neondatabase/serverless to v0.6.0
storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Patch Changes

  • c7b111c: fix(kv): upgrade upstash package to latest 1.24.3
storage - @vercel/[email protected]

Published by github-actions[bot] 12 months ago

Patch Changes

  • 0e9fc17: Exports the ListBlobResultBlob so it can be imported from the @vercel/blob package.
  • 41c4483: This introduces jsdoc comments for all functions that are publicly accessible in the @vercel/blob npm package.
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 9a6c44f: Add copy method to @vercel/blob package. This method offers the functionality to copy an existing blob file to a new path inside the blob store. #419
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 15de089: fix(deps): update dependency undici to v5.26.2 [security]
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 3cf97b1: This new version brings consistent and detailed errors about request failures (store does not exist, blob does not exist, store is suspended...).
    BREAKING CHANGE: head() will now throw instead of returning null when the blob does not exist.
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 4701d58: Upgrade neon to latest, reverts cache-control on request to undefined
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • f033492: Handle relative urls in upload()'s callbackUrl #399
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • d90e973: Removed "types" field from package.json to support "moduleResolution": "Node16"
  • Updated dependencies [d90e973]
storage - @vercel/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • d90e973: Removed "types" field from package.json to support "moduleResolution": "Node16"