
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
aws-s3-uploaders
Advanced tools
S3 compatible file uploader Plugin for Vite
$ npm i aws-s3-uploaders
uploadOptionsdefault toACL: 'public-read'so you may need to override if you have other needs.
Add vite-plugin-s3 plugin to vite.config.js / vite.config.ts and configure it:
import { AwsS3Uploader } from 'aws-s3-uploaders';
const uploader = AwsS3Uploader({
basePath: '/build',
clientConfig: {
credentials: {
accessKeyId: '',
secretAccessKey: '',
},
region: 'eu-west-2',
},
uploadOptions: {
Bucket: 'my-bucket',
},
}),
],
});
uploader.apply();
| Option | Description | Type | Default |
|---|---|---|---|
exclude | A Pattern to match for excluded content | string,RegExp,Function,Array | null |
include | A Pattern to match for included content | string,RegExp,Function,Array | null |
clientConfig | The configuration interface of S3Client class constructor | S3ClientConfig | required |
uploadOptions | PutObjectRequest options except Body and `Key' | PutObjectRequest | required |
basePath | Namespace of uploaded files on S3 | string | null |
directory | Directory to upload | string | null |
include and exclude rulesinclude and exclude in addition to a RegExp you can pass a function which will be called with the path as its first argument. Returning a truthy value will match the rule. You can also pass an Array of rules, all of which must pass for the file to be included or excluded.
import { AwsS3Uploader } from 'aws-s3-uploaders';
import isGitIgnored from 'is-gitignored';
// Up to you how to handle this
var isPathOkToUpload = function (path) {
return require('my-projects-publishing-rules').checkFile(path);
};
const uploader = AwsS3Uploader({
// Only upload css and js and only the paths that our rules database allows
include: [
/.*\.(css|js)/,
function (path) {
isPathOkToUpload(path);
},
],
// function to check if the path is gitignored
exclude: isGitIgnored,
clientConfig: {
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
},
region: 'eu-west-2',
},
uploadOptions: {
Bucket: 'my-bucket',
},
});
uploader.apply();
import { AwsS3Uploader } from 'aws-s3-uploaders';
const uploader = AwsS3Uploader({
clientConfig: {
credentials: {
accessKeyId: process.env.DO_ACCESS_KEY_ID,
secretAccessKey: process.env.DO_SECRET_ACCESS_KEY,
},
endpoint: 'https://fra1.digitaloceanspaces.com',
region: 'fra1',
},
uploadOptions: {
Bucket: 'my-bucket',
},
});
uploader.apply();
FAQs
Unknown package
The npm package aws-s3-uploaders receives a total of 2 weekly downloads. As such, aws-s3-uploaders popularity was classified as not popular.
We found that aws-s3-uploaders demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.