Skip to content

v1.3.2

Choose a tag to compare

@iwater iwater released this 11 Dec 07:52
· 21 commits to main since this release

Add file upload plugin and fix header parsing in C++ bridge

Summary

Implemented a new file upload plugin in Rust and fixed critical header parsing issue in the C++ bridge.

Changes

  1. Rust Upload Plugin:

    • Created upload plugin for handling multipart file uploads
    • Saves uploaded files to configurable temp directory
    • Adds upload metadata to request headers for JS callback processing
  2. TypeScript Types:

    • Added UploadMount interface and integrated into Mountable union type
    • Updated TypeScript definitions to support new plugin type
  3. Documentation Updates:

    • Updated README files with upload plugin examples and documentation
    • Added comprehensive test page for file upload functionality
  4. C++ Bridge Fix:

    • Fixed critical bug where request headers were not being parsed from JSON
    • Headers are now properly deserialized from headers_json field and passed to JS callbacks
    • Removed .value() call from non-optional headers map

Features

✅ File upload support via multipart/form-data
✅ Configurable temporary directory for uploads
✅ Upload metadata passed to JS callbacks
✅ Updated test page with file upload UI
✅ Fixed headers parsing for all request types

The upload plugin enables secure file handling in Rust while maintaining flexibility for JS-based processing logic.