code: @Override
      public synchronized AttachmentResourceWritable addAttachment(File file, AttachmentType type, String name) throws RepositoryException {
          AttachmentResourceImpl at = new AttachmentResourceImpl(file, name);
          at.setType(type);
          // Massive can set this, but we need to know it before then, as we may want to compare this attachment
          // size with the size of an attachment already uploaded.
          at.setFileProps();
          _attachments.put(name, at);
          return at;
      }
docs: {@inheritDoc}