kostysh/File-uploading-component-for-Sencha-Touch — pull request #13 by travist (2013-06-13 02:50:58+00:00)
Title: Add the ability to sign a request before it is sent out.

I am working on interfacing this with Drupal file services. They just recently made a change to where every request must be signed before it can be sent to the server with an Authentication token to stop XSRF. When they made this change, the file uploads stopped working. I made a change to your library that allows a derived class to sign a request before it is sent out, like the following...

```
Ext.define('DrupalTouch.ux.DrupalFile', {
extend: 'Ext.ux.Fileup',
xtype: 'drupalfile',
requires: [
'Ext.ux.Fileup'
],
signRequest: function(http, callback) {
Ext.Ajax.request({
url: '/services/session/token',
method: 'GET',
success: function(response) {
http.setRequestHeader("X-CSRF-Token", response.responseText);
callback(http);
}
});
}
});
```

This PR adds this ability. I appreciate this library.