Possible bug in AngularJS fork

89 views
Skip to first unread message

Ted Pritchard

unread,
Jan 21, 2015, 6:29:32 AM1/21/15
to jquery-f...@googlegroups.com
Hi,

When I try the code provided by the AngularJS fork of the jQuery file upload project I notice that on line 2512 of uploader.js there is the following line:

            fileUpload.addFieldData($scope.name, data._response.result.files[0].result);

I don't think 'result' forms part of the response (maybe it did in the past).  As a result an exception is thrown later on at this code:

          var generateFileObject = function generateFileObjects(objects) {
            angular.forEach(objects, function (value, key) {
              var fileObject = {
                name: value.filename,
                size: value.length,
                url: value.url,
                thumbnailUrl: value.url,
                deleteUrl: value.url,
                deleteType: 'DELETE',
                result: value
              };


In this case the 'objects' array contains one 'undefined' entry.  If I delete 'results' in above code then 'objects' contains an object with values.

Is there  a bug in the code?

Cheers

Ted

Lucas Gabriel

unread,
Jul 23, 2015, 4:32:28 PM7/23/15
to jQuery-File-Upload, tjp.k...@gmail.com
Hey man! just saw your post and used ur answer. VERY NOICE! thx a lot. I'm trying the config laravel 5 restful + angularjs frontend for my app.

and I will use heavily file uploading.

well used ur answer and it works like a charm!

well the prob that arises is a 403 forbidden error afterwards I assume is trying to access the thumbnail cuz it does not show...
Reply all
Reply to author
Forward
0 new messages