Azure/azure-storage-node

using setBlobProperties with partial properties is overriding any other properties

gilm123 opened this issue · 1 comments

For latest features support, please switch to Azure Storage JavaScript SDK V10.

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

2.10.3

What's the Node.js/Browser version?

12.14.1

What problem was encountered?

using setBlobProperties on an existing blob file with 1 property, delete all other properties

Steps to reproduce the issue?

upload a blob, for example, a JS file, check the blob properties after uploading it,
then use setBlobProperties, with only cacheControl property, you will notice the contentType type will be changed from application/javascript to undefined.
same for other properties.

Have you found a mitigation/solution?

i understand the method name is starting with set but given that all properties are optional at the typescript type, you wouldn't expect them to be overridden to undefined if they are not set.
i would expect only the ones i used calling that method.

why is that matter ? after the content type was changed, encoding through CDN wasn't working because it is encoding specific type of files which now doesn't have a value