Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
jio-main
Commits
ba28619b
Commit
ba28619b
authored
Dec 24, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some method to get attachment informations to command.js
parent
982efe39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
src/jio/commands/command.js
src/jio/commands/command.js
+36
-0
No files found.
src/jio/commands/command.js
View file @
ba28619b
...
...
@@ -96,6 +96,42 @@ var command = function(spec, my) {
return
priv
.
doc
;
};
/**
* Returns the data of the attachment
* @method getAttachmentData
* @return {string} The data
*/
that
.
getAttachmentData
=
function
()
{
return
priv
.
doc
.
_data
;
};
/**
* Returns the data length of the attachment
* @method getAttachmentLength
* @return {number} The length
*/
that
.
getAttachmentLength
=
function
()
{
return
priv
.
doc
.
_data
.
length
;
};
/**
* Returns the mimetype of the attachment
* @method getAttachmentMimeType
* @return {string} The mimetype
*/
that
.
getAttachmentMimeType
=
function
()
{
return
priv
.
doc
.
_mimetype
;
};
/**
* Generate the md5sum of the attachment data
* @method md5SumAttachmentData
* @return {string} The md5sum
*/
that
.
md5SumAttachmentData
=
function
()
{
return
hex_md5
(
priv
.
doc
.
_data
);
};
/**
* Returns an information about the document.
* @method getDocInfo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment