code: @Override
      public Attachment updateAttachment(String assetId, AttachmentSummary summary) throws IOException, BadVersionException, RequestFailureException {
          // First find the attachment to update
          Asset ass = getAsset(assetId);
          List<Attachment> attachments = ass.getAttachments();
  
          if (attachments != null) {
              for (Attachment attachment : attachments) {
                  if (attachment.getName().equals(summary.getName())) {
                      this.deleteAttachment(assetId, attachment.get_id());
                      break;
                  }
              }
          }
          return this.addAttachment(assetId, summary);
      }
docs: This method will update an existing attachment on an asset. Note that
  Massive currently doesn't support update attachment so this will do a
  delete and an add.
  
  @param assetId
  The ID of the asset that the attachment is attached to
  @param name
  The name of the attachment to update
  @param file
  The file to attach
  @param attach
  Attachment metadata
  @return
  @throws IOException
  @throws RequestFailureException