OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
5.12k stars 813 forks source link

[backend] on Artifact creation pass mime_type to upload (#7486)(#7434) #7490

Closed labo-flg closed 1 day ago

labo-flg commented 2 days ago

Proposed changes

when creating artifact, we have the MIME type. We simply pass it down to the upload function as option ; if defined we use otherwise we try to guess it.

Related issues

closes #7486 closes 7434

codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 49.42529% with 44 lines in your changes missing coverage. Please review.

Project coverage is 67.77%. Comparing base (a8f9419) to head (3ba3586). Report is 10 commits behind head on master.

Files Patch % Lines
...tform/opencti-graphql/src/database/file-storage.js 50.00% 36 Missing :warning:
...-platform/opencti-graphql/src/http/httpPlatform.js 0.00% 4 Missing :warning:
...pencti-graphql/src/database/file-storage-helper.ts 66.66% 1 Missing :warning:
...pencti-platform/opencti-graphql/src/domain/file.js 0.00% 1 Missing :warning:
...tform/opencti-graphql/src/domain/stixCoreObject.js 0.00% 1 Missing :warning:
...opencti-graphql/src/resolvers/externalReference.js 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #7490 +/- ## ========================================== + Coverage 67.34% 67.77% +0.43% ========================================== Files 563 567 +4 Lines 69688 69844 +156 Branches 5890 6041 +151 ========================================== + Hits 46928 47336 +408 + Misses 22760 22508 -252 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

labo-flg commented 1 day ago

@aHenryJard found another issue ; I'm putting back to draft

aHenryJard commented 1 day ago

All good for me now, tested locally with connector malwarebaazar