         self.fileContentsView?.contentSize = CGSize(width: 100*(self.receivedFiles?.count)!, height: 120)
         for index in 0..<files.count{
             let file = files[index]
-            let tempView = UIView(frame: CGRect(x: 100*index, y: 0, width: 100, height: 100))
+            let tempView = UIView(frame: CGRect(x: 100*index, y: 10, width: 100, height: 100))
             tempView.tag = 10000+index
             tempView.backgroundColor = UIColor.lightGray
             self.fileContentsView?.addSubview(tempView)
-            if(file.mimeType?.contains("image/"))!{
+            if(file.fileType == FileType.Image){
                 self.downLoadThumbnail(file, onView: tempView)
             }else{
                 let titleLabel = UILabel(frame: CGRect(x: 10, y: 10, width: tempView.frame.size.width-20, height: tempView.frame.size.height-20))

        do{
            let jsonData = try JSONSerialization.data(withJSONObject: message.dictPresent(), options: .prettyPrinted)
            self.contentTextView?.text = String(data: jsonData, encoding: .utf8)
        }catch{}
    }
    
    public func setUpFileContentsView(files: [FileObjectModel]){

        self.fileContentsView?.removeFromSuperview()
        self.fileContentsView = UIScrollView(frame: CGRect(x: 10, y: 315, width: kScreenWidth-20, height: 120))
        self.fileContentsView?.backgroundColor = UIColor.init(red: 240/255, green: 240/255, blue: 240/255, alpha: 1.0)
  
        self.view.addSubview(self.fileContentsView!)

    override func viewDidLoad() {
        super.viewDidLoad()
        self.setupView()
        self.registerMessageCallBack()
    }
    
    // MARK: - SparkSDK: register Message receive CallBack
    private func registerMessageCallBack(){
        self.sparkSDK?.messages?.onMessage = {message in
            self.updateMessageAcitivty(message)
        }
