openkfw / TruBudget

A blockchain-based workflow tool for efficient and transparent project management
https://openkfw.github.io/trubudget-website/
GNU General Public License v3.0
83 stars 39 forks source link

Upload documents up to 75MB #1832

Closed SamuelPull closed 3 weeks ago

SamuelPull commented 1 month ago

Description 😯

TruBudget currently uploads files in base64 encoded strings. This made sense when files were stored on chain. However, it is not the most efficient solution: Encoding and decoding takes processing power and memory. Base64 encoding increases the filesize by about 33 per cent, which leads to longer transmission times. For more efficient file upload and storage, we can use a method designed for file upload: multipart/form-data. Standard libraries for it are form-data on FE, fastify-multipart in api and multer in express services.

How to reproduce 🕹

  1. Create a workflowitem and upload a large file
  2. Cryptic error message appears

Screenshots 📷

Clipboard - 10  Mai 2024 15_23

Solution

Your Environment 🌎

Tech Version
Frontend v2.?.?
API v2.?.?
Blockchain v2.?.?
Export-Service v2.?.?
Email-Service v2.?.?
Storage-Service v2.?.?