malthe commented on code in PR #6443:
URL: https://github.com/apache/nifi/pull/6443#discussion_r995685308
##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java:
##########
@@ -121,18 +146,47 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
if (createContainer && !containerClient.exists()) {
containerClient.create();
}
- BlobClient blobClient = containerClient.getBlobClient(blobName);
+ BlobClient blobClient = containerClient.getBlobClient(blobName);
+ final BlobRequestConditions blobRequestConditions = new
BlobRequestConditions();
+ Map<String, String> attributes = new HashMap<>();
Review Comment:
@nandorsoma the attributes are not applied in case of an error; the code
will not reach the `session.putAllAttributes(flowFile, attributes)` in this
case.
According to the
[documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.storage.blobs.models.blobproperties.contenttype?view=azure-dotnet#definition),
the default mimetype is "application/octet-stream".
It would seem that `ATTR_NAME_LANG` should be there exactly because of
backwards compatibility. It is expected that if the upload succeeds, then that
attribute is there and by default, equal to null.
In case of an error, the attribute will not be set (similar to above).
I'll take a look about cleaning up the code to make it less verbose around
the important bits.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]