-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#175374436] Allow lowercase transformation on png naming while uploading a Service image Logo #95
[#175374436] Allow lowercase transformation on png naming while uploading a Service image Logo #95
Conversation
Affected stories
Generated by 🚫 dangerJS |
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
==========================================
+ Coverage 82.93% 83.06% +0.12%
==========================================
Files 48 48
Lines 1600 1624 +24
Branches 126 126
==========================================
+ Hits 1327 1349 +22
- Misses 268 270 +2
Partials 5 5
Continue to review full report at Codecov.
|
UploadServiceLogo/index.ts
Outdated
@@ -27,6 +28,8 @@ const servicesContainer = database.container(SERVICE_COLLECTION_NAME); | |||
|
|||
const serviceModel = new ServiceModel(servicesContainer); | |||
|
|||
const blobService = createBlobService(config.StorageConnection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isnt this AssetsStorageConnection
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is but it's not present in config module :) I'd rather add this variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear to me what changes have been introduced in this PR. The title and the related story both mention to keep the name lowercase, but then the while upload process has been revised.
UploadServiceLogo/handler.ts
Outdated
tUpsertBlobFromObject( | ||
blobService, | ||
"services", | ||
`${serviceId.toLowerCase()}.png`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd save this value in a variable as it's being used later in the code.
I've updated description :) |
Lgtm |
Ok let's wait before merging this, due to integration tests execution. |
This PR introduce lowercase transformation on blob name while uploading a service logo, due to wrong discovery by IO-APP that uses lowercase naming convention.
It also introduce the azure storage' sdk usage, because these kind of transformations (lowercase of the variables) are not allowed in azure bindings approach.
So changes can be resumed as follow:
function.json
;blobService
, in order to write blob onAssetsStorage
identified byAssetsStorageConnection
config variable;AssetsStorageConnection
that was missing;