Skip to content

Commit

Permalink
FormData: Add convenient method to retrieve Blob name directly withou…
Browse files Browse the repository at this point in the history
…t extra looping over all FormData fields.
  • Loading branch information
jayarjo committed Feb 21, 2013
1 parent 757aecc commit c4fbdf3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/javascript/xhr/FormData.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ define("moxie/xhr/FormData", [
return _fields[_blobField] && _fields[_blobField][0] || null;
},

/**
Retrieves blob field name.
@method geBlobName
@return {String} Either Blob field name or null
*/
getBlobName: function() {
return _blobField || null;
},

/**
Loop over the fields in FormData and invoke the callback for each of them.
Expand Down

0 comments on commit c4fbdf3

Please sign in to comment.