Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New property ajaxSettings to allow configuring ajax params #162

Closed
kartik-v opened this issue Feb 5, 2015 · 1 comment
Closed

New property ajaxSettings to allow configuring ajax params #162

kartik-v opened this issue Feb 5, 2015 · 1 comment

Comments

@kartik-v
Copy link
Owner

kartik-v commented Feb 5, 2015

A new property ajaxSettings will be added that will allow setting own tokens in headers or allow developers to setup advanced ajax options.

@sijo-vijayan
Copy link

Hi,

I would like to pass a Token as the http header along with this fileupload http request, Can you give me an example code for this purpose ?

I'm using this with in an angularjs application, this is currently what i have done.

zentieraDirectives.directive('fileinput', function($rootScope) {
    return {
        restrict: 'A',
        link: function(scope, element, attrs) {
            $(element).fileinput({ 'uploadUrl' : $rootScope.STATIC_URL+'users/addPhoto', ajaxSettings : { headers: { Token: 'Bearer ' } } });
        }
    };
});

Header value appearing in wrong place, refer the attached image

desctop screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants