Uploaded image for project: 'SIdora'
  1. SIdora
  2. SID-1159

As an admin, I need FITS to not depend on physical file paths

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • Services
    • None
    • 4

      As an admin, I need FITS to not depend on physical file paths.  This is required to make FITS a standalone service especially for Docker.  Our routes depend on GET "examine" calls that use a physical path to access the file to test, locking FITS to the same server as SMX.  We need to change to a PUT that includes the file as an upload.  This is a little bit slower but not likely to be a bottleneck.

       Rework all fits http calls to use form/data and post.

      Something like this should do the trick with a file on body and http4 component.

      .process(new Processor() {
      @Override
      public void process(Exchange exchange) throws Exception

      { MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create(); multipartEntityBuilder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); String filename = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class); File file = exchange.getIn().getBody(File.class); multipartEntityBuilder.addPart("datafile", new FileBody(file, ContentType.MULTIPART_FORM_DATA, filename)); exchange.getOut().setBody(multipartEntityBuilder.build()); }

      })
      .to("http4:si.fits.host/examine?headerFilterStrategy=#dropHeadersStrategy")
      .log(LoggingLevel.INFO, "FITS RESPONSE BODY ${body}").end();

      Deploying the standalone FITS service is handled by a separate issue.

            DavisDa Davis, Daniel
            DavisDa Davis, Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: