How can I pass a string representation of an image to Cloudinary upload? - cloudinary

Is it possible to get an image from a client application (Angular using ng-file-upload) and pass this into a webApi controller to then upload to Cloudinary?
Reading the docs it seems that the Cloudinary API expects to read the image directly from file/Amazon S3 bucket/internet location?
How can I pass the string representation of an image to cloudinary upload?

Cloudinary allows you to upload using a BASE64 URI representation as well. For more information see: https://support.cloudinary.com/hc/en-us/articles/203125741-Can-I-upload-using-DATA-URI-BASE64-
Direct upload can be established either based on the jQuery plugin or ng-file-upload plugin. Both are demonstrated in this sample project.

Related

How to upload an image to IBM Cloud object storage (COS) using Node.js?

I am using ibm-cos-sdk but I can able to store text files only, but I want to upload images and pdf files. Can someone help me out of that?
The IBM Cloud solution tutorial on how to apply end to end security to a cloud app features a file sharing app. The files are stored in COS, the app built using Node.js. See these lines of code for the example.
// upload to COS
await cos.upload({
Bucket: COS_BUCKET_NAME,
Key: `${fileDetails.userId}/${fileDetails.id}/${fileDetails.name}`,
Body: fs.createReadStream(file.path),
ContentType: fileDetails.type,
}).promise();
The snippet uses the mentioned ibm-cos-sdk with the S3 interface. I have used the app and code to upload images and PDFs.

Storing a remote hosted image on S3 directly using java sdk

I know I can download the image on server and then upload again to S3 or any other cloud hosting service, but is there any way to store the image asset directly on s3 by supplying URL of asset instead of a file, because I don't want to add unwanted download and upload on my server.
Note: I am assured that the URI will be 99.9% up and image file will also be there. And I am OK to use services other than S3 if they have such a feature.
No. There is no API call for Amazon S3 that will retrieve content from another location.
You must supply the content as part of the API call.

Imageresizer with c# Web API

I was checking Imageresizer S3 Reader2 plugin, and I have the following question.
My app is basically a c# REST API that has a functionality of serving
photos (resized photos).
Would it be possible to use Imageresizer+Amazon S3 with REST API so I can resize
photos in with Imageresizer in c# before serving it and without transferring original photo over network?
You'll have to transfer the original photo from S3 to your server (at least once) in order to resize it. The S3Reader2 plugin does this automatically. If you want to prevent repeat requests, look into SourceDiskCache.
Otherwise, that's exactly how ImageResizer+S3Reader2 functions.

What is the difference between Cloudinary and Carrierwave?

What is the difference between Cloudinary and Carrierwave, and if they're different, how does one complement the other? (I am planning to use these in a Rails 5.0.2 application.)
Cloudinary is a service for storing images and other media files, and accepts various upload parameters, as well as URL parameters for on-the-fly processing.
CarrierWave is a Ruby library for attaching files, which means it will upload given files to a storage backend (filesystem, S3, Google Cloud etc), and write only the file identifier into the record column.
CarrierWave can use Cloudinary as just another storage backend, and utilize Cloudinary's on-the-fly processing and other features, which is useful if you don't want to process images yourself. CarrierWave can also use another storage backend (filesystem, S3, Google Cloud etc), but most of them are just "dumb object storages" without processing capabilities. Similarly, you can use Cloudinary without CarrierWave, but then you need to implement behaviour for attaching uploaded files to database records yourself.

How to access (read/write) advanced file EXIF/metadata in the Dropbox JavaScript API?

How to access (read/write) advanced file metadata in the Dropbox JavaScript API?
I'm talking about things like e.g.: MacOS file tags. Or the camera model inside the EXIF data.
Please note that dbx.filesGetMetadata(arg) does not provide very detailed metadata... Almost only dropbox specific metadata actually.
Any ideas?
Kudos to Greg.
The Dropbox API unfortunately doesn't natively return Mac OS file metadata/xattrs, or the full EXIF information for a file. The Dropbox API currently only natively returns a few pieces of basic media information in FilesFileMetadata.media_info, e.g., if you set FilesGetMetadataArg.include_media_info to true when calling filesGetMetadata or filesListFolder/filesListFolderContinue.
To get any other metadata embedded in the file content, you'll need to download the file content and parse it out client-side.