Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/s3-presigned-post

Package Overview
Dependencies
Maintainers
5
Versions
419
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/s3-presigned-post

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/s3-presigned-post/latest.svg)](https://www.npmjs.com/package/@aws-sdk/s3-presigned-post) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/s3-presigned-post.svg)](https://www.npmjs.com/package/@

  • 3.569.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
152K
decreased by-40.19%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/s3-presigned-post?

@aws-sdk/s3-presigned-post is a package that allows you to generate presigned POST URLs for Amazon S3. These URLs enable users to upload files directly to S3 without needing to expose AWS credentials or write server-side code to handle the uploads.

What are @aws-sdk/s3-presigned-post's main functionalities?

Generate Presigned POST URL

This feature allows you to generate a presigned POST URL for uploading files to an S3 bucket. The code sample demonstrates how to create a presigned POST URL with specific conditions, such as a content length range.

const { S3Client } = require('@aws-sdk/client-s3');
const { createPresignedPost } = require('@aws-sdk/s3-presigned-post');

const client = new S3Client({ region: 'us-west-2' });

const params = {
  Bucket: 'example-bucket',
  Key: 'example-object',
  Expires: 60, // URL expiration time in seconds
  Conditions: [
    ['content-length-range', 0, 1048576], // 1 MB limit
  ],
};

async function generatePresignedPost() {
  try {
    const data = await createPresignedPost(client, params);
    console.log('Presigned POST URL:', data.url);
    console.log('Fields:', data.fields);
  } catch (err) {
    console.error('Error generating presigned POST URL', err);
  }
}

generatePresignedPost();

Other packages similar to @aws-sdk/s3-presigned-post

FAQs

Package last updated on 03 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc