![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@livescale/s3-streams
Advanced tools
Use readable/writeable streams for manipulating S3 objects.
Support for streaming reads and writes from and to S3 using Amazon's native API.
Amazon makes it a giant pain to do anything stream-like when it comes to S3 (given the general restriction that every request needs a Content-Length
header). We provide native stream classes (both Readable
and Writable
) that wrap aws-sdk
S3 requests and responses to make your life easier.
IMPORTANT: This library uses the streams3
API. In order to provide compatibility with older versions of node we make use of readable-stream. This is unlikely to have any effect on your code but has not yet been well tested.
If you are using node 0.8
you must ensure your version of npm
is at least 1.4.6
.
Features:
npm install s3-streams
Create streams for uploading to S3:
var S3 = require('aws-sdk').S3,
S3S = require('s3-streams');
var upload = S3S.WriteStream(new S3(), {
Bucket: 'my-bucket',
Key: 'my-key',
// Any other AWS SDK options
// ContentType: 'application/json'
// Expires: new Date('2099-01-01')
// ...
});
Create streams for downloading from S3:
var S3 = require('aws-sdk').S3,
S3S = require('s3-streams');
var download = S3S.ReadStream(new S3(), {
Bucket: 'my-bucket',
Key: 'my-key',
// Any other AWS SDK options
});
Smart pipe files over HTTP:
var http = require('http'),
S3 = require('aws-sdk').S3,
S3S = require('s3-streams');
http.createServer(function(req, res) {
var src = S3S.ReadStream(...);
// Automatically sets the correct HTTP headers
src.pipe(res);
})
Smart pipe files on S3:
var S3 = require('aws-sdk').S3,
S3S = require('s3-streams');
var src = S3S.ReadStream(...),
dst = S3S.WriteStream(...);
// No data ever gets downloaded locally.
src.pipe(dst);
You can create streams with different settings by creating a partial for the specific S3 instance you have:
var instance = new S3(), s3 = {
createReadStream: _.partial(S3ReadStream, instance),
createWriteStream: _.partial(S3WriteStream, instance)
}
var stream = s3.createReadStream({ Bucket: 'my-bucket', Key: 'my-key' });
Existing frameworks:
FAQs
Use readable/writeable streams for manipulating S3 objects.
The npm package @livescale/s3-streams receives a total of 0 weekly downloads. As such, @livescale/s3-streams popularity was classified as not popular.
We found that @livescale/s3-streams demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.