title: Uploadify onUploadSuccess not returning my data
body: <p>On the backend I'm sending: <code>res.send(JSON.stringify(back));</code> where <code>back</code>, after being stringified is:</p>
  
  <pre><code>{"success":true,"data":{"success":true,"data":{"name":"-kkWjmTLb","version":1,"dateCreated":1407448946239,"dateUpdated":1407448946239,"vidLoc":"rtmp://xxxxxxx.cloudfront.net/cfx/st/vid_-kkWjmTLb","thumbLoc":"https://xxxxxxxxxxx.cloudfront.net/big_icon.png","author":"53a47a469c52c9d83a2d71d9","videoBucket":"xx.xxxxxxxx","thumbBucket":"xx.xxxxxxxx","scenario":false,"fakeName":xxxxxxxxxx.flv"}}}
  </code></pre>
  
  <p>`</p>
  
  <p>On the frontend I'm doing this: </p>
  
  <pre><code>$(htmlId).uploadify('settings','onUploadSuccess', function(file, data, res) {
              console.log('uploadSuccess',data);
  </code></pre>
  
  <p>And the console log tells me that <code>data</code> is <code>OK</code></p>
  
  <p>Not that big string up there, but simply <code>OK</code>.</p>
  
  <p>How can I get my string to the frontend as a response to uploadify?</p>
  
  <hr>
  
  <p>The full bakend code:</p>
  
  <pre><code>app.post('/uploadVideo',function(req,res){
      console.log("hit video upload");
      checkProperties(req.query,['name','ext','tenant'],function(results){
          if(!results.error){
              var form = new formidable.IncomingForm();
              form.uploadDir = __dirname+'/uploads';
              form.keepExtensions = true;
  
              console.log('queries are ',req.query);
  
              form.on('file',function(field,file){
                  var data = {};
                  var uid = shortId.generate();
                  var renamed = form.uploadDir + "/vid_"+uid;
                  fs.rename(file.path,renamed);
  
                  if(typeof req.query.tenant !== 'undefined'){
                      console.log('setting data');
                      data.tenant = req.query.tenant;
                      data.fakeName = req.query.name;
                      data.name = uid;
                      console.log('data set',data);
                  }else{
                      console.log('no tenant');
                      res.send(400);
                      return;
                  }
  
                  console.log('calling uploadVideoS3',data);
                  uploadVideoS3(renamed,req.query.ext,data,fs.readFileSync(renamed),function(back){
                      if(back.success){
                          console.log('done uploaded to S3',JSON.stringify(back));
                          res.send(JSON.stringify(back)); 
                      }else{
                          console.log('video upload S3 failed');
                          res.send(400);
                      }
                  });
              });
  
              form.on('error',function(err){
                  console.log("error with file upload " + err);
                  res.send(400);
                  res.end();
              });
  
              form.on('end',function(){
                  console.log("done");
              });
  
              form.parse(req, function(err, fields, files) {
                  res.send(200);
                  res.end();
              });
          }else{
              res.send(400);
              res.send(results.message);
          }
      });
  });
  </code></pre>
  
  <p>The frontend code:</p>
  
  <pre><code>$scope.initVideoUploader = function(){
          uploadifyService.videoUploadInit('#videoUpload',function(back){
              if(back.data){
                  console.log('file selected is:',back.data.name);
                  var name = back.data.name; 
                  var ext = back.data.name.substring(back.data.name.lastIndexOf('.')+1);
                  uploadifyService.uploadVideo('#videoUpload',name,ext);
              }
  
              if(back.identifier){
                  console.log(back);
                  // var item = _.findWhere($scope.content.myContent.videos, {name: recorderInfo.id.toString()});
                  // console.log(recorderInfo.id, item);
                  // $scope.content.openItem(item);
              }
          });
      };
  </code></pre>
  
  <p>uploadifyService.js:</p>
  
  <pre><code>videoUploadInit: function(htmlId,callback){
              $(htmlId).uploadify({
                  'scriptAccess': 'always',
                  'multi': false,
                  'auto': true,
                  'swf': '/js/plugins/uploadify.swf',
                  'buttonText': 'Upload Video',
                  'fileTypeExts': '*.flv;',
                  'fileSizeLimit': '20MB', 
                  'onSelect': function(file, queueId) {
                      console.log('videoUploadInit onSelect hit');
                      callback({
                          data: file,
                          queueId: queueId
                      });
                  },
                  'onUploadSuccess': function(file, data, res) {
                      console.log('upload success from videoUploadInit',res);
                      callback({
                          identifier:true,
                          data2:data,
                          response:res
                      });
                  },
              });
          },
  
          uploadVideo:function(htmlId,name,ext){
              $(htmlId).uploadify('settings','uploader',configService.getNodeSocketApi() + "/uploadVideo?tenant=" + sessionService.getCustomerId() + sessionService.getUserId()+'&amp;ext='+ext+'&amp;name='+name);
              $(htmlId).uploadify('settings','script',configService.getNodeSocketApi() + "/uploadVideo?tenant=" + sessionService.getCustomerId() + sessionService.getUserId()+'&amp;ext='+ext+'&amp;name='+name);
              $(htmlId).uploadify('upload', '*');
          },
  </code></pre>