Class UploadResource
java.lang.Object
com.xebialabs.xlrelease.api.internal.UploadResource
@Path("/upload")
@Consumes("multipart/form-data")
@Produces("text/html; charset=utf-8")
@Controller
public class UploadResource
extends Object
Handle file uploads used in various features of Digital.ai Release.
Upload URIs are not secured, because with IE the upload component falls back to an iframe, where we cannot pass authentication headers. In order to limit the risk of exposing unsecured URIs, we make them temporary: before performing an upload, the client requests a one-time token, that it must append to the URI it submits to.
Results must be TEXT_PLAIN because of IE9 iframe download handling, ZIP type makes IE believes it's a download of zip file.-
Constructor Summary
ConstructorsConstructorDescriptionUploadResource(com.xebialabs.xlrelease.security.PermissionChecker permissionChecker, com.xebialabs.xlrelease.export.TemplateImporter templateImporter, UploadService uploadService) -
Method Summary
Modifier and TypeMethodDescriptionaddAttachments(String ciId, jakarta.servlet.http.HttpServletRequest request) List<com.xebialabs.xlrelease.views.ImportResult> importTemplates(jakarta.servlet.http.HttpServletRequest request, String folderId)
-
Constructor Details
-
UploadResource
@Autowired public UploadResource(com.xebialabs.xlrelease.security.PermissionChecker permissionChecker, com.xebialabs.xlrelease.export.TemplateImporter templateImporter, UploadService uploadService) -
UploadResource
public UploadResource()
-
-
Method Details
-
importTemplates
@POST @Path("templates/zip") public List<com.xebialabs.xlrelease.views.ImportResult> importTemplates(@Context jakarta.servlet.http.HttpServletRequest request, @QueryParam("folderId") String folderId) throws IOException - Throws:
IOException
-
addAttachments
@POST @Path("attachment/{ciId}") public List<AttachmentView> addAttachments(@PathParam("ciId") String ciId, @Context jakarta.servlet.http.HttpServletRequest request) throws IOException - Throws:
IOException
-
addLogo
@POST @Path("logo/{templateId:.*Release[^/-]*}") public TemplateLogoView addLogo(@PathParam("templateId") String templateId, @Context jakarta.servlet.http.HttpServletRequest request) throws IOException - Throws:
IOException
-