                 doc.size  ?= file.size
                 doc.class ?= file.class
                 doc.mime  ?= file.mime
+                doc.tags  ?= file.tags or []
                 @pouch.db.put doc, callback
             else if file
                 @resolveConflict side, doc, callback
             else
+                doc.tags ?= []
                 @ensureParentExist side, doc, =>
                     @pouch.db.put doc, callback
 

                @markSide side, doc, folder
                @markSide side, was, was
                doc.creationDate ?= was.creationDate
                doc.tags         ?= was.tags
                if folder
                    @resolveConflict side, doc, (err, dst) =>
                        dst.sides = {}

                @resolveConflict side, doc, callback
            else if folder
                doc._rev = folder._rev
                doc.tags ?= folder.tags or []
                doc.creationDate ?= folder.creationDate
                if @sameFolder folder, doc
                    callback null
                else
                    @pouch.db.put doc, callback
            else
                doc.tags ?= []
                doc.creationDate ?= new Date
                @ensureParentExist side, doc, =>
                    @pouch.db.put doc, callback
