thenikso / angular-cloudinary Goto Github PK
View Code? Open in Web Editor NEWAngularJS only module to handle Cloudinary image upload and display with no jQuery dependency
AngularJS only module to handle Cloudinary image upload and display with no jQuery dependency
How do i add watermark options?
Is it possible?
This seems to have a package conflict when installing in Angular 1.4 with bower. Can we update this to Angular 1.4?
ECONFLICT Unable to find suitable version for angular
Hello! I am trying to use your library. Showing images works fine. But i have some issue with upload images to cloudinary. Can you help me with this?
$scope.$watch('somePhoto', function(myFile) {
console.log("112233");
// Use the service to upload the file
//cloudinary.upload(myFile, { /* cloudinary options here */ })
// This returns a promise that can be used for result handling
//.then(function (resp) {
//alert('all done!');
//});
});
I try output the console log in watch... by any result..
<input type="file" ng-model="somePhoto">
On .upload()
, the pre-flight OPTIONS call is failing because "Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response"
.
Here's the simple method I'm using:
upload(file, imageContext) {
return $q((resolve, reject) => {
let sendData = {
timestamp: Date.now(),
public_id: file.name
};
// get signature before uploading
getSignature(sendData).then(
res => {
sendData.file = file;
sendData.api_key = cloudinaryApiKey;
sendData.signature = res.key;
cloudinary.upload(file, sendData).then(
res => {
resolve(res);
}
)
},
});
}
This the current Access-Control-Request-Headers made in the pre-flight call: accept, authorization, content-type
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.