Interface IAttachment


@Path("/attachment/{domainUid}") public interface IAttachment
API used in conjunction with IFileHosting to share mail attachments by replacing them with a link
  • Method Details

    • share

      @PUT @Path("{name}/share") AttachedFile share(@PathParam("name") String name, Stream document) throws ServerFault
      Share a mail attachment
      Parameters:
      name - the filename
      document - Stream of the file data
      Returns:
      AttachedFile containg informations about the shared file
      Throws:
      ServerFault - common error object
    • shareDedup

      @PUT @Path("{extension}/share_dedup") AttachedFile shareDedup(@PathParam("extension") String extension, Stream document) throws ServerFault
      Share a mail attachment. If a document with the same hash already exists, it will not be uploaded.
      Parameters:
      extension - the extension to use for the file (eg. 'png')
      document - Stream of the file data
      Returns:
      AttachedFile containg informations about the shared file
      Throws:
      ServerFault - common error object
    • unShare

      @DELETE @Path("{url}/unshare") void unShare(@PathParam("url") String url) throws ServerFault
      Deactivate a link to a shared file
      Parameters:
      url - Link to the shared file
      Throws:
      ServerFault - common error object
    • getConfiguration

      @GET @Path("_config") Configuration getConfiguration() throws ServerFault
      Retrieves the configuration
      Returns:
      the Filehosting service configuration
      Throws:
      ServerFault - common error object