Help with Angular

Archived from the Transloadit support forum. Originally posted on January 25, 2014; details may be outdated, see our docs for current behavior. Original thread

Hey guys,
So I don’t know any jquery and only recently learned angular + js. I’m following this tut https://github.com/kera-inc/ng-transloadit and I guess auth is required for it. So I copied the nodejs code from https://transloadit.com/docs/api-docs#authentication-implementations and now I put it in my express.js.
1st question: how do I get the ‘signature’ to insert into the angular service?
2nd: What would the input form code be for this angular directive?
3rd: Should I just combine it somehow with https://github.com/danialfarid/angular-file-upload/ ? Is that better since I don’t know any jquery and dont plan on learning it?

THanks I really hope I found the right service finally :slight_smile:

Hey Matt,

thank you for your interest in our service. Here are your answers:

  1. The example code in the tutorial shows a function for this:
signature: function(callback) {
        // ideally you would be generating this on the fly somewhere
        callback('here-is-my-signature');
      },

So in that function you would do a call to your server (via $.ajax, or $.getJson or something Angular specific) and generate the signature on your server. You cannot generate the signature on the client as that would mean that you have to put your authSecret into your public Javascript code, which is a definite no-go.

  1. & 3) I don’t really have any experience for this custom Angular module. I think these questions would be better directed towards the author of the module and then ask him to also update the module’s documentation. :slight_smile: If he doesn’t respond, then please let me know and I’ll try to figure it out from the module’s source code.

I hope this helps you a bit.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos