Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16871

Support camel-aws2-s3 multipart with remote files

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 4.x
    • camel-aws2
    • None
    • Unknown

    Description

      Camel aws2-s3 mutlipart upload only supports Files.

       

      There are at least two approaches to solving this:

      The hard, general case and a simple specific case.

       

      1) The harder but general case: use something like Spring's aws SimpleStorageInputStream:

      https://github.com/spring-cloud/spring-cloud-aws/blob/main/spring-cloud-aws-core/src/main/java/org/springframework/cloud/aws/core/io/s3/SimpleStorageResource.java

       and translate any exchange body to an Inputstream for mulitpart uploads.

       

      2) The simpler but specific case: for remote files in particular, camel often makes use of a localwork directory to download files. In fact,

      e.getIn().getBody(File.class) 
      

      will resolve the file in the local work directory when polling from an FTP site with a local work directory specified.

       

      The aws2-s3 producer (AWS2S3Producer.class) on lines 134 to 145 would need to be modified in both cases.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bmarcj Brendan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: