
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@placeos/cloud-uploads
Advanced tools
To be used in conjuction with Comdominios.
This project is a library for handling secure direct to cloud uploads that are managed by the Condominios project. At Place we use it to handle all of our file ingestion as it:
takes the load away from our API servers
allows us to support hybrid cloud models
works seamlessly with AWS Lambda and Google Cloud Functions
Manages an upload queue with pause, resume and progress for each upload
Supports configuring individual upload parallelism and the number of simultaneous uploads
All files are hashed in webworkers before upload for data integrity
Communicates with Condominios to obtain signed requests for the uploads
Install the node package with npm install @placeos/cloud-uploads
Initialise the service in your code before using it.
import { initialiseUploadService, Amazon } from '@placeos/cloud-uploads';
function bootstrap() {
initialiseUploadService({
auto_start: true,
token: 'access_token',
endpoint: '/api/engine/v2/uploads',
worker_url: 'assets/md5_worker.js',
providers: [Amazon] as any,
});
}
Load file data into browser and call the method to upload the file.
import { uploadFiles, Upload } from '@placeos/cloud-uploads';
function uploadFile(file: File) {
const fileReader = new FileReader();
fileReader.addEventListener('loadend', (e: any) => {
const arrayBuffer = e.target.result;
const blob = blobUtil.arrayBufferToBlob(arrayBuffer, file.type);
const [upload] = uploadFiles([blob], { file_name: file.name });
...
});
fileReader.readAsArrayBuffer(file);
}
Upload
type provides an obserable for the status/progress of the upload
const [upload] = uploadFiles([blob], { file_name: file.name });
upload.subscribe((state) => (state.status === 'error' ? console.log('Status:', state.error) : console.log('Status:', state.status)));
FAQs
Signed direct to cloud uploads
The npm package @placeos/cloud-uploads receives a total of 23 weekly downloads. As such, @placeos/cloud-uploads popularity was classified as not popular.
We found that @placeos/cloud-uploads demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.