Jinntec / Fore

Fore - declarative user interfaces in plain HTML
MIT License
82 stars 11 forks source link

upload control #109

Open JoernT opened 2 years ago

JoernT commented 2 years ago

implementation and demo still missing

JoernT commented 2 years ago

created demo/upload.html as a starter.

? Maybe created separate fx-upload component instead of using fx-control

JoernT commented 2 years ago

For 1.0.0 it would be sufficient to handle it via XML as host.

The content will be base64-encoded and become the value of the referenced node. The filename needs a place also. Still open if to

<fx-control ref="content">
    <label>upload</label>
    <input type="file" name="filename">
</fx-control>

possible but maybe not too clear.

Maybe better and more extensible:

<fx-upload filename="xpath ref"  content="xpath ref">
    <label>upload</label>
</fx-upload>

An optional 'url' could provide ajax submit to an endpoint

<fx-upload filename="..." url="http....">