Skip to content

📄💫 File conversion #49603

Closed
Closed

Description

@juliusknorr

This has been discussed upfront with @sorbaugh and @AndyScherzinger

We should introduce a file conversion API that apps can register their ability to convert certain file types in certain other ones. In the beginning we will make use of this in richdocuments to be able to convert office files to PDF. The files app will then be able to make use of that API to provide a file action for conversion. Flow can also use this API for automation through OCS endpoints

  • Server API to have a plugin architecture where apps can register file convertion handlers @elzody
    • OCP API for apps to register their conversion capabilities and implement logic to convert files
      • Input/output format tuples provided by apps
      • Capabilities exposing possible file conversion formats
      • Capability to limit file conversion to files below a configurable size threshold
      • Add fake provider in the testing app
    • OCS API to do synchronous file conversion
  • richdocuments: Implement conversion for office to pdf files
  • pandoc: Implement conversion for other types @juliusknorr
  • Files app: File action to convert a file to a different type @skjnldsv feat(api): File conversion Files action #50123

Out of scope

  • Asynchronous conversion for larger files
  • Additional file types (e.g. video, image or more advanced AI related ones) -> should be planned separately

Activity

  1. added
    1. to develop
    on Dec 2, 2024
  2. moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity teamon Dec 2, 2024
  3. added this to the Nextcloud 31 milestone on Dec 2, 2024
  4. changed the title [-]File conversion[/-] [+]📄💫 File conversion[/+] on Dec 2, 2024
  5. juliusknorr commented on Dec 5, 2024

    @juliusknorr
    MemberAuthor

    From discussion with @AndyScherzinger

    • We should support multiple providers (e.g. pandoc as well)
    • We should have a preferred conversion option list to only offer one option per tuple
    • Need to make sure this list of preferred options is only loaded once needed when converting to select which provider to prefer (php array)
  6. moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Productivity teamon Dec 5, 2024
  7. moved this from 📄 To do (~10 entries) to 🏗️ In progress in 📝 Productivity teamon Jan 7, 2025
  8. self-assigned this
    on Jan 10, 2025
  9. added
    pending documentation
    on Jan 16, 2025
  10. juliusknorr commented on Jan 23, 2025

    @juliusknorr
    MemberAuthor

    @skjnldsv @elzody Would it make sense to move the jpg/png converter out of testing into the files app itself?

  11. 7 remaining items

  12. added
    2. developing
    and removed
    1. to develop
    on Feb 27, 2025
  13. HabiburRahmaan commented on Apr 11, 2025

    @HabiburRahmaan

    This is a very solid proposal — having a modular file conversion API with a plugin architecture is a smart and scalable direction.

    A couple of suggestions and observations:

    API Design: It might be useful to look at existing solutions like ApyHub’s File Conversion API for inspiration on format handling, error management, and performance constraints. Their format abstraction and clear endpoint documentation could inform our OCS API design.

    Capability Registration: We should consider a lightweight way for apps to advertise their supported (inputFormat, outputFormat) pairs. This can help avoid hardcoded logic and support a dynamically growing conversion ecosystem.

    Limits & Thresholds: The size threshold is a great idea. It could be extended later with time-based constraints (e.g. reject if estimated conversion time exceeds X).

    Synchronous vs. Async: While async is out of scope for now, keeping the architecture open to both patterns will future-proof this. Maybe model the current API as convertNow() and plan for a queueConversion() style API for async tasks.

    Security: We should be mindful of file sanitization and format-specific vulnerabilities during conversion, especially if apps implement custom handlers.

    Testing & Mocks: Love the idea of a fake provider in the testing app — should also help in CI pipelines.

    Looking forward to seeing richdocuments and pandoc as the first consumers — this will be a strong proof of concept and foundation for future file-type support.

  14. juliusknorr commented on May 26, 2025

    @juliusknorr
    MemberAuthor

    Thanks for your additional feedback. I agree that mid-term an async approach would be more flexible. I'll close this as the scope of the initial feature was implemented, but we can discuss further improvements in follow up tickets of course.

  15. moved this from 👀 In review to ☑️ Done in 📝 Productivity teamon May 26, 2025
  16. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    This issue has been automatically locked because it has been closed for more than 14 days. As we do not monitor closed issues, we are locking this issue to prevent further comments from getting lost in the noise.
    Please open a new issue if you have a similar problem instead. For general discussions, please use our forum: https://help.nextcloud.com

  17. locked as resolved and limited conversation to collaborators on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

2. developingenhancementpending documentation🍀 2025-Spring

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions