title: ng-flow issuing a GET, but not a POST
body: <p>I am trying to use ng-flow in angular for single image upload against an Express back end. When I select an image for upload, it appears that ng-flow is sending a GET request to my target (/admin/upload), then nothing else. I assume the GET is just part of the testChunks behavior, but i'm still unclear on why i'm not seeing a POST from the browser. </p>
  
  <p>Here is the portion of my client dealing with ng-flow. It is based heavily on the code samples in ng-flow.</p>
  
  <pre><code>&lt;div flow-init="{target: '/admin/upload'}" flow-prevent-drop
                       flow-drag-enter="style={border: '5px solid green'}"
                       flow-drag-leave="style={}"
                       test-chunks="false"
                       ng-style="style"
                       flow-files-submitted="$flow.upload()"
                       flow-file-success="$file.msg = $message"&gt;
  
                      &lt;div class="container"&gt;
                          &lt;h1&gt;flow basic example&lt;/h1&gt;
                          &lt;hr class="soften"/&gt;
  
                          &lt;div class="row"&gt;
  
                              &lt;div class="span6"&gt;
                                  &lt;h2&gt;Buttons:&lt;/h2&gt;
  
                                  &lt;span class="btn" flow-btn&gt;&lt;i class="icon icon-file"&gt;&lt;/i&gt;Upload File&lt;/span&gt;
  
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;hr class="soften"&gt;
  
                          &lt;h2&gt;Transfers:&lt;/h2&gt;
  
                          &lt;p&gt;
                              &lt;a class="btn btn-small btn-success" ng-click="$flow.resume()"&gt;Upload&lt;/a&gt;
                              &lt;a class="btn btn-small btn-danger" ng-click="$flow.pause()"&gt;Pause&lt;/a&gt;
                              &lt;a class="btn btn-small btn-info" ng-click="$flow.cancel()"&gt;Cancel&lt;/a&gt;
                              &lt;span class="label label-info"&gt;Size: {{$flow.getSize()}}&lt;/span&gt;
                              &lt;span class="label label-info"&gt;Is Uploading: {{$flow.isUploading()}}&lt;/span&gt;
                          &lt;/p&gt;
                          &lt;table class="table table-hover table-bordered table-striped" flow-transfers&gt;
                              &lt;thead&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;#&lt;/th&gt;
                                  &lt;th&gt;Name&lt;/th&gt;
                                  &lt;th&gt;Size&lt;/th&gt;
                                  &lt;th&gt;Relative Path&lt;/th&gt;
                                  &lt;th&gt;Unique Identifier&lt;/th&gt;
                                  &lt;th&gt;#Chunks&lt;/th&gt;
                                  &lt;th&gt;Progress&lt;/th&gt;
                                  &lt;th&gt;Paused&lt;/th&gt;
                                  &lt;th&gt;Uploading&lt;/th&gt;
                                  &lt;th&gt;Completed&lt;/th&gt;
                                  &lt;th&gt;Settings&lt;/th&gt;
                              &lt;/tr&gt;
                              &lt;/thead&gt;
                              &lt;tbody&gt;
                              &lt;tr ng-repeat="file in transfers"&gt;
                                  &lt;td&gt;{{$index+1}}&lt;/td&gt;
                                  &lt;td&gt;{{file.name}}&lt;/td&gt;
                                  &lt;td&gt;{{file.size}}&lt;/td&gt;
                                  &lt;td&gt;{{file.relativePath}}&lt;/td&gt;
                                  &lt;td&gt;{{file.uniqueIdentifier}}&lt;/td&gt;
                                  &lt;td&gt;{{file.chunks.length}}&lt;/td&gt;
                                  &lt;td&gt;{{file.progress()}}&lt;/td&gt;
                                  &lt;td&gt;{{file.paused}}&lt;/td&gt;
                                  &lt;td&gt;{{file.isUploading()}}&lt;/td&gt;
                                  &lt;td&gt;{{file.isComplete()}}&lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;div class="btn-group"&gt;
                                          &lt;a class="btn btn-mini btn-warning" ng-click="file.pause()" ng-hide="file.paused"&gt;
                                              Pause
                                          &lt;/a&gt;
                                          &lt;a class="btn btn-mini btn-warning" ng-click="file.resume()" ng-show="file.paused"&gt;
                                              Resume
                                          &lt;/a&gt;
                                          &lt;a class="btn btn-mini btn-danger" ng-click="file.cancel()"&gt;
                                              Cancel
                                          &lt;/a&gt;
                                          &lt;a class="btn btn-mini btn-info" ng-click="file.retry()" ng-show="file.error"&gt;
                                              Retry
                                          &lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;/tbody&gt;
                          &lt;/table&gt;
  
                          &lt;hr class="soften"/&gt;
  
                          &lt;div class="alert" flow-drop flow-drag-enter="class='alert-success'" flow-drag-leave="class=''"
                               ng-class="class"&gt;
                              Drag And Drop your file here
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
              &lt;/div&gt;
  
  
          &lt;/div&gt;
  </code></pre>
  
  <p>Here is an extract from my express.js file. You will notice I have defined an app.post and an app.get method for the upload URL.</p>
  
  <pre><code>var express = require('express'),
  favicon = require('static-favicon'),
  morgan = require('morgan'),
  compression = require('compression'),
  bodyParser = require('body-parser'),
  methodOverride = require('method-override'),
  cookieParser = require('cookie-parser'),
  session = require('express-session'),
  errorHandler = require('errorhandler'),
  path = require('path'),
  config = require('./config'),
  passport = require('passport'),
  mongoStore = require('connect-mongo')(session);
  
  var multipart = require('connect-multiparty');
  var multipartMiddleware = multipart();
  
  process.env.TMPDIR = 'tmp';
  var flow = require('../../flow-node.js')('tmp');
  
  /**
  * Express configuration
  */
  module.exports = function(app) {
  var env = app.get('env');
  
  if ('development' === env) {
  app.use(require('connect-livereload')());
  
  // Disable caching of scripts for easier testing
  app.use(function noCache(req, res, next) {
    if (req.url.indexOf('/scripts/') === 0) {
      res.header('Cache-Control', 'no-cache, no-store, must-revalidate');
      res.header('Pragma', 'no-cache');
      res.header('Expires', 0);
    }
      if(path.extname(req.url) == '.js'){
          res.set('Content-Type','text/javascript');
  
      }
   }
    next();
  });
  
  app.use(express.static(path.join(config.root, '.tmp')));
  app.use(express.static(path.join(config.root, 'app')));
  app.set('views', config.root + '/app/views');
    app.set('scripts', config.root + '/app/scripts');
    app.set('bower_components', config.root + '/app/bower_components');
  
    app.post('/admin/upload', multipartMiddleware, function(req, res) {
        console.log('in POST...');
  
        flow.post(req, function(status, filename, original_filename, identifier) {
            console.log('POST', status, original_filename, identifier);
            res.send(200, {
                // NOTE: Uncomment this funciton to enable cross-domain request.
                'Access-Control-Allow-Origin': '*'
            });
        });
    });
  
    app.get('/admin/upload', function(req, res) {
        flow.get(req, function(status, filename, original_filename, identifier) {
            console.log('GET', status);
            res.send(200, (status == 'found' ? 200 : 404));
        });
    });
  
    app.get('/admin/download/:identifier', function(req, res) {
        flow.write(req.params.identifier, res);
    });
    }
  </code></pre>
  
  <p>Have I missed something fundamental in the markup for ng-flow? or something in Express? Or? Thank you in advance.</p>