Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ii:labs:s2:03:tasks:04 [2022/05/04 14:05]
radu.ciobanu created
ii:labs:s2:03:tasks:04 [2024/04/01 21:39] (current)
florin.stancu created
Line 1: Line 1:
-==== 04. [30pWriting a Dockerfile ​====+==== 04. [20pBonus: file upload ​==== 
 + 
 +Bonus task: add a upload image input inside the ''​account-details''​ that uploads a file to the ''​public/​images/​profile''​ subfolder (also: create it!): 
 + 
 +  * Use ''​type="​file"''​ attribute on the ''<​input>'';​ 
 +  * Use ''​multipart/​form-data''​ encoding type attribute on the ''<​form>''​ (Google it!); 
 +  * Inside the Flask route function: 
 +    * Actually, [[https://​flask.palletsprojects.com/​en/​3.0.x/​patterns/​fileuploads/​|Read The Fine Manual]] for this! 
 +  * Finally, add an ''<​img>''​ tag to display the profile photo on the user's account page when everything is done! 
ii/labs/s2/03/tasks/04.1651662308.txt.gz · Last modified: 2022/05/04 14:05 by radu.ciobanu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0