205stelzear / elections

Website / Webapp to create and view elections for any Scout group
https://205stelzear-elections.v-ed.ca/
MIT License
0 stars 0 forks source link

Add possibility to "upload" picture to use as page logo #60

Closed V-ed closed 4 years ago

V-ed commented 4 years ago

This would allow for a group to add their identity to the voting process.

The "upload" wouldn't be a real upload per say - it would be all in the browser's data. There would be no connection to any server for this, meaning it will even work locally (the premise of this app).

https://stackoverflow.com/a/34178498

Storing it into the data string would mean that it would persist in the database file created, and also go through a shared session, which is quite interesting. (Base64 encoded image FTW!)

This would be added in the setup page, probably also using the already built file loader component I used for the homepage.

To only accept images in an input type="file" : https://stackoverflow.com/a/6225815 . For compatibility (see can I use table), I would go with the below :

<input type="file" name="myImage" accept="image/*" />