You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gulp-s3-uploader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-s3-uploader

Gulp plugin for uploading files to Amazon S3 with v3 api

1.0.7
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

gulp-s3-uploader

Version 1.0.6

Insprired by gulp-s3-upload use for uploading assets to Amazon S3 servers with v3 api.

Install

npm install gulp-s3-uploader

Usage

Use same options as gulp-s3-upload but simplified.

import gulp from 'gulp';
import s3 from 'gulp-s3-uploader';

or in commonjs

const gulp = require('gulp');
const s3 = require('gulp-s3-uploader');

create client instance:

const s3Client = s3(clientConfig: ClientConfig);

type ClientConfig = Partial<S3ClientConfig> & {
  key?: string; // short of accessKeyId
  secret?: string; // short of secretAccessKey
  accessKeyId?: string; // your access key
  secretAccessKey?: string; // your secret key
}

see S3ClientConfig at S3Client Configuration

then use it in gulp:

gulp.src('src/**/*')
  .pipe(s3Client(pluginConfig: PluginConfig))
  .pipe(...)

type PluginConfig = Partial<PutObjectCommandInput> & {
    // the chartset added to mime type, then pass to Content-Type  default: 'utf8'
    charset?: string;
    // the etag hash algorithm to hasha, default: 'md5'
    etagHash?: hasha.AlgorithmName;
    // if true, will not upload if there is no change
    uploadNewFilesOnly?: boolean;
    // this function could fix the PluginConfig params by keyname during runtime
    maps?: Record<keyof PluginConfig, (keyname: string) => any>;
    // transform each keyname before upload
    keyTransform?: (keyname: string) => string;
    // no change callback
    onNoChange?: (keyname: string) => void;
    // change callback
    onChange?: (keyname: string) => void;
    // new file callback
    onNew?: (keyname: string) => void;
} & Record<string, any>

see PutObjectCommandInput at PutObjectCommand

License

MIT

Keywords

gulp

FAQs

Package last updated on 16 May 2025

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