Coder Social home page Coder Social logo

angular-cloudinary's People

Contributors

gerardcuadras avatar ianforsyth avatar thenikso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angular-cloudinary's Issues

$watch not handled when select image

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?

  1. i use this your directive https://gist.github.com/thenikso/8899bc6b760e094dd2b5
  2. and than in my controller i try do this (from your example)
$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..

  1. in view i have next
<input type="file" ng-model="somePhoto">

Request header field Authorization is not allowed

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

Angular 1.4

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.