Skip to content

Question: CSRF_TOKEN #40

Closed
Closed
@brunocascio

Description

@brunocascio

Hi!

How to embbed a CSRF TOKEN in form data?

app.controller('UploadPhoto', function($scope, $http, $fileUploader, CSRF_TOKEN) 
{

   // create a uploader with options
    var uploader = $scope.uploader = $fileUploader.create({
        scope: $scope,                          // to automatically update the html. Default: $rootScope
        url: '/profile/me/photo',
        formData: [
            { csrf_token: CSRF_TOKEN }
        ],
        filters: [
            function (item) {                    // first user filter
                console.info('filter1');
                return true;
            }
        ]
    });

Not work...

Help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions