Handling sharp's output to upload into cloud storage buckets?
See original GitHub issueHi,
Not sure what would be the best approach to handle and upload the result of sharp’s transformations. To clarify, I have a google storage bucket that can upload (using google-cloud-node) pointing from a local file location, or more specifically stream from that local file location. example:
bucket.upload('/var/folders/8p/image.png', function(err, file, apiResponse) {
// Your bucket now contains:
// - "image.png" (with the contents of '/var/folders/8p/image.png')
// `file` is an instance of a File object that refers to your new file.
});
or
fs.createReadStream('/var/folders/8p/...')
.pipe(file.createWriteStream())
.on('error', function(err) {})
.on('finish', function() {
// The file upload is complete.
});
So my question is: is the best way to write sharp’s result into memory and then upload the file via location path, or is it possible to create a stream of the result and upload the result directly?
Sorry for the novice question in advance, I saw some discussions that were somewhat related, but didn’t really provide any direct solutions.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Upload objects from a filesystem | Cloud Storage
This page shows you how to upload objects to your Cloud Storage bucket from your local filesystem. An uploaded object consists of the...
Read more >Protecting Yourself When Handling Contaminated Sharps
Sharps disposal containers must be readily accessible and located as close as feasible to the area where sharps will be used. In some...
Read more >Upload files with Cloud Storage on Android - Firebase
Cloud Storage for Firebase allows you to quickly and easily upload files to a Cloud Storage bucket provided and managed by Firebase.
Read more >Strategies for Sharps Disposal Container Use During Supply ...
Always place sharps in sharps disposal containers, not in the trash. ... Remain upright and stable during use and handling. Sharps Disposal Label ......
Read more >Bulk Loading from Google Cloud Storage
If you already have a Google Cloud Storage account and use Cloud Storage buckets for storing and managing your data files, you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello, you can stream the result.
Using the example at https://github.com/GoogleCloudPlatform/google-cloud-node#preview-2
@taruyar The two and a half year old example code is from https://github.com/googleapis/google-cloud-node so you’ll need to check/ask in that repo.