Skip to content

[backend/frontend] can upload file from markdown editor (#7281)#15556

Draft
esrevi wants to merge 16 commits intomasterfrom
issue/7281-markdown-uploadfile
Draft

[backend/frontend] can upload file from markdown editor (#7281)#15556
esrevi wants to merge 16 commits intomasterfrom
issue/7281-markdown-uploadfile

Conversation

@esrevi
Copy link
Copy Markdown
Member

@esrevi esrevi commented Apr 17, 2026

Proposed changes

  • MarkdownField update: importing file image <= 5Mb directly by paste, drop or browse an image, and set at the cursor position
  • Store the image in the storage/embedded/[entity]
  • Update opencti_stix2 on client python to transform a embedded link storage to a data base64 image
  • On importing, after draft approval, transform the images in base64 to file, store them at the right place, and return a storage link

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@github-actions github-actions Bot added the filigran team use to identify PR from the Filigran team label Apr 17, 2026
Comment thread client-python/tests/01-unit/utils/test_opencti_stix2.py Fixed
@esrevi esrevi self-assigned this Apr 17, 2026
@esrevi esrevi changed the title Issue/7281 markdown uploadfile [backend/frontend] can upload file from markdown editor (#7281) Apr 17, 2026
@esrevi esrevi force-pushed the issue/7281-markdown-uploadfile branch 2 times, most recently from 6ee71bc to 1ea2502 Compare April 20, 2026 15:32
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 65.78658% with 311 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.56%. Comparing base (2c2809d) to head (7501828).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...latform/opencti-graphql/src/manager/syncManager.js 0.00% 96 Missing ⚠️
...latform/opencti-graphql/src/database/middleware.ts 49.70% 86 Missing ⚠️
...i-graphql/src/database/middlewareEmbeddedImages.ts 58.72% 71 Missing ⚠️
...i-graphql/src/database/markdown-embedded-images.ts 87.43% 47 Missing ⚠️
client-python/pycti/utils/opencti_stix2.py 88.54% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #15556       +/-   ##
===========================================
+ Coverage   33.44%   67.56%   +34.12%     
===========================================
  Files        3188      952     -2236     
  Lines      216129   104208   -111921     
  Branches    39858     9114    -30744     
===========================================
- Hits        72283    70410     -1873     
+ Misses     143846    33798   -110048     
Flag Coverage Δ
opencti-client-python 46.18% <88.54%> (+0.58%) ⬆️
opencti-front ?
opencti-graphql 70.19% <63.09%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@esrevi esrevi force-pushed the issue/7281-markdown-uploadfile branch from 7e851d7 to c37c213 Compare April 21, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Be able to easily copy/paste images, upload etc. in markdown editor (+ more capabilities)

1 participant