         {withCredentials}
       success: (data) ->
         content = cloudContentFactory.createEnvelopedCloudContent data
-        if @options.patch then @previouslySavedContent = content.clone()
+        @previouslySavedContent = if @options.patch then content.clone() else null
         metadata.name ?= data.docName
         callback null, content
       error: ->

      xhrFields:
        withCredentials: true
      success: (data) ->
        if @options.patch then @previouslySavedContent = cloudContent.clone()
        if data.id then metadata.providerData.id = data.id

        callback null, data

      dataType: 'json'
      type: 'POST'
      url: url
      data: pako.deflate sendContent
      contentType: mimeType
      processData: false
      beforeSend: (xhr) ->
