Skip to content

$scope.upload progress/success callbacks not working #224

Closed
@leaky

Description

@leaky

I have the angular-file-upload script and it's posting to my express app which is then saving the file, so the good news is that the script is working... However, for some reason the progress/success callbacks don't seem to be doing anything at all and my developer console just remains blank...?

$scope.onFileSelect = function ($files) {
                var file = $files;
                $scope.upload = $upload.upload({
                    url: '/upload',
                    data: {myObj: $scope.myModelObj},
                    file: file
                }).progress(function (evt) {
                    console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total));
                }).success(function(data, status, headers, config) {
                    console.log(data);
                });
        };

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