Namespace SSB.dragDrop
Support for accessing data of local files dropped onto the SSB.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> {String} |
SSB.dragDrop.getContentType()
Returns the content-type of our binary post body
|
| <static> {Object} |
SSB.dragDrop.getPostBody(formVars, fileVarNames)
Will generate a binary post body (multipart) from the files that were dropped on the SSB.
|
| <static> {void} |
SSB.dragDrop.ondrop()
Drop handler, use in the form 'SSB.dragDrop.ondrop = function() {.
|
Method Detail
<static>
{String}
SSB.dragDrop.getContentType()
Returns the content-type of our binary post body
- Returns:
- {String}
<static>
{Object}
SSB.dragDrop.getPostBody(formVars, fileVarNames)
Will generate a binary post body (multipart) from the files that were dropped on the SSB.
xmlhttp.open('POST', 'www.fubar.com/upload');
xmlhttp.setRequestHeader('Content-Type', SSB.dragDrop.getContentType());
var postBody = SSB.dragDrop.getPostBody(formVars, fileVars);
xmlhttp.send(postBody);
- Parameters:
- {Object} formVars
- Any additional key/value pairs to be encoded with our post body. For example {'id' : 1024, 'tags' : 'cool,funny,wtf'}
- {Array} fileVarNames
- The variable names for the dropped file/s. For example ['file1', 'file2', 'file3']
- Returns:
- {Object}
<static>
{void}
SSB.dragDrop.ondrop()
Drop handler, use in the form 'SSB.dragDrop.ondrop = function() {...}'
- Returns:
- {void}