Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solving #8 Of the 3 proposed solutions in #8, the first is limited by size, and the third one was complicated to implement inside a React app with shacl-form's shadow DOM. So, the plugin option was the best answer to this issue. The goal of this plugin is to pass a lambda as a parameter that handles the file upload. E.g., in a React app: ```ts const [myFile, setMyFile] = useState<File>(); form.registerPlugin(new FileUploadPlugin({datatype: '...'}, (event) => setMyFile(event.target.files?.[0]))); ``` Potential issue: if the form has multiple file upload inputs, and the user submits two different files with the same name (like `joe/profile.png` and `jane/profile.png`), the result will be, for both images, the fake path of the browser: `C:\fakepath\profile.png`. This will make it hard to distinguish between them after form submission. Something needs to be implemented here, to be investigated..
- Loading branch information