docs: function(params, callback) {
                  var fileName,
                      fileType,
                      fileSize,
                      fileExtension,
                      uploadUniqueId,
                      uploadThreadId;
  
                  fileName = params.file.name;
                  fileType = params.file.type;
                  fileSize = params.file.size;
                  fileExtension = params.file.name.split('.')
                      .pop();
  
                  var uploadFileData = {};
  
                  if (params) {
                      if (typeof params.file !== 'undefined') {
                          uploadFileData.file = params.file;
                      }
  
                      if (typeof params.fileName == 'string') {
                          uploadFileData.fileName = params.fileName;
                      }
                      else {
                          uploadFileData.fileName = Utility.generateUUID() + '.' + fileExtension;
                      }
  
                      uploadFileData.fileSize = fileSize;
  
                      if (parseInt(params.threadId) > 0) {
                          uploadThreadId = params.threadId;
                          uploadFileData.threadId = params.threadId;
                      }
                      else {
                          uploadThreadId = 0;
                          uploadFileData.threadId = 0;
                      }
  
                      if (typeof params.uniqueId == 'string') {
                          uploadUniqueId = params.uniqueId;
                          uploadFileData.uniqueId = params.uniqueId;
                      }
                      else {
                          uploadUniqueId = Utility.generateUUID();
                          uploadFileData.uniqueId = uploadUniqueId;
                      }
  
                      if (typeof params.originalFileName == 'string') {
                          uploadFileData.originalFileName = params.originalFileName;
                      }
                      else {
                          uploadFileData.originalFileName = fileName;
                      }
                  }
  
                  httpRequest({
                      url: SERVICE_ADDRESSES.FILESERVER_ADDRESS + SERVICES_PATH.UPLOAD_FILE,
                      method: 'POST',
                      headers: {
                          '_token_': token,
                          '_token_issuer_': 1
                      },
                      data: uploadFileData,
                      uniqueId: uploadUniqueId
                  }, function(result) {
                      if (!result.hasError) {
                          try {
                              var response = (typeof result.result.responseText == 'string')
                                  ? JSON.parse(result.result.responseText)
                                  : result.result.responseText;
                              callback({
                                  hasError: response.hasError,
                                  result: response.result
                              });
                          }
                          catch (e) {
                              callback({
                                  hasError: true,
                                  errorCode: 999,
                                  errorMessage: 'Problem in Parsing result'
                              });
                          }
  
                      }
                      else {
                          callback({
                              hasError: true,
                              errorCode: result.errorCode,
                              errorMessage: result.errorMessage
                          });
                      }
                  });
  
                  return {
                      uniqueId: uploadUniqueId,
                      threadId: uploadThreadId,
                      participant: userInfo,
                      content: {
                          caption: params.content,
                          file: {
                              uniqueId: uploadUniqueId,
                              fileName: fileName,
                              fileSize: fileSize,
                              fileObject: params.file
                          }
                      }
                  };
              }