Skip to content

🐛(backend) support creating subdoc from file#1987

Open
gustavotrott wants to merge 1 commit intosuitenumerique:mainfrom
gustavotrott:create-subdoc-from-content
Open

🐛(backend) support creating subdoc from file#1987
gustavotrott wants to merge 1 commit intosuitenumerique:mainfrom
gustavotrott:create-subdoc-from-content

Conversation

@gustavotrott
Copy link

Purpose

The children/ endpoint was missing file upload support that the root documents endpoint already had. Added file-to-YJS conversion handling to subdocument creation.

Proposal

  • Add file-to-YJS conversion handling to the subdocument creation endpoint (POST /api/v1.0/documents/{parent-id}/children/)
  • Reuse the existing Converter logic already in place for root document creation
  • Set the document title to the uploaded filename, consistent with root document behaviour

External contributions

Thank you for your contribution! 🎉

Please ensure the following items are checked before submitting your pull request:

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)
  • I have added corresponding tests for new features or bug fixes (if applicable)

The children/ endpoint was missing file upload support that the root
documents endpoint already had. Added file-to-YJS conversion handling
to subdocument creation.

Signed-off-by: Gustavo Trott <gustavo@trott.com.br>
@lunika
Copy link
Member

lunika commented Mar 12, 2026

It is not a bug, it is intended.

That saying, I think it is acceptable to have the feature available in the API but not yet in the frontend application.

@virgile-dev
Copy link
Collaborator

@gustavotrott I though that using the ressource server you'd be able to push your ydoc directly to the location you want in the tree.
While we're interested to bring the import feature in Doc view so you can import children in a parent doc, I don't understand why you need it for your BBB integration.
Cheers

@gustavotrott
Copy link
Author

@gustavotrott I though that using the ressource server you'd be able to push your ydoc directly to the location you want in the tree. While we're interested to bring the import feature in Doc view so you can import children in a parent doc, I don't understand why you need it for your BBB integration. Cheers

After creating the meeting summary what we have at hand is a markdown file.
And for now we create a subdoc using the markdown as content.

That was the way we found to achieve it.
Please let me know if you thought about a different approach (the API calls I should use) and I can test it.

@virgile-dev
Copy link
Collaborator

I though it was for the live meeting notes. If it's for the summary it make sense to do it this way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants