turcsanyip commented on a change in pull request #4423:
URL: https://github.com/apache/nifi/pull/4423#discussion_r460399383



##########
File path: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java
##########
@@ -451,7 +466,6 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
                 public void process(final InputStream rawIn) throws 
IOException {
                     try (final InputStream in = new 
BufferedInputStream(rawIn)) {
                         final ObjectMetadata objectMetadata = new 
ObjectMetadata();
-                        
objectMetadata.setContentDisposition(URLEncoder.encode(ff.getAttribute(CoreAttributes.FILENAME.key()),
 "UTF-8"));

Review comment:
       `Content-Disposition` was originally set to the filename.
   The current change is not backward compatible with it because the default is 
`inline` and the "no value" case also falls back to `inline`.
   I would suggest to use no default value and to keep the current logic 
(setting the filename) when the property is not specified. This way it would 
not be a breaking change and could be added in a minor release (which may have 
backward compatible changes only).
   Furthermore, as far as I understand, `inline` / `attachment` are only 
relevant in case of web hosting mode. So having a third option for non web 
hosting mode seems to me reasonable too.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to