diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-07-07 09:16:13 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-19 08:52:49 -0400 |
commit | d78ebab108942058a100e0f607771c4addafb698 (patch) | |
tree | e15ea58c83979e003556e063460368f509a5ebd5 /web/react/utils/utils.jsx | |
parent | 7004a348b59d5572e8c84eb1c8138bf45cbd0d3e (diff) | |
download | chat-d78ebab108942058a100e0f607771c4addafb698.tar.gz chat-d78ebab108942058a100e0f607771c4addafb698.tar.bz2 chat-d78ebab108942058a100e0f607771c4addafb698.zip |
Implemention of slack import feature.
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 618cc1557..f0a343513 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -982,3 +982,12 @@ module.exports.getUserIdFromChannelName = function(channel) { return otherUserId; }; + +module.exports.importSlack = function(file, success, error) { + formData = new FormData(); + formData.append('file', file, file.name); + formData.append('filesize', file.size); + formData.append('importFrom', 'slack'); + + client.importSlack(formData, success, error); +}; |