You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2021/09/13 05:56:00 UTC

[jira] [Commented] (CAMEL-16871) Support camel-aws2-s3 multipart with remote files

    [ https://issues.apache.org/jira/browse/CAMEL-16871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17413909#comment-17413909 ] 

Andrea Cosentino commented on CAMEL-16871:
------------------------------------------

I think we could also use the same approach as the single op is doing https://github.com/apache/camel/blob/main/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java#L270

as an else case.

> Support camel-aws2-s3 multipart with remote files
> -------------------------------------------------
>
>                 Key: CAMEL-16871
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16871
>             Project: Camel
>          Issue Type: Wish
>          Components: camel-aws2-s3
>            Reporter: Brendan
>            Priority: Minor
>
> 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|http://example.com/]
>  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,
> {code:java}
> e.getIn().getBody(File.class) 
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)