Skip to content
Alex edited this page Jul 20, 2014 · 15 revisions

1. How do I deal with Cross Site Request Forgery protection?

See this issue: #40

For example, in Ruby on Rails, add an additional header, and use this method for verifying XSRF:

var csrf_token = document.querySelector('meta[name="csrf-token"]').getAttribute('content');

var uploader = $scope.uploader = new FileUploader({
    // your code here...
    headers : {
        'X-CSRF-TOKEN': csrf_token // X-CSRF-TOKEN is used for Ruby on Rails Tokens
    },
    //...
});

2. How to update options dynamically?

See this comment

3. I need custom options. Are there they?

See this comment

Clone this wiki locally