Posts

Showing posts from December, 2018

Flask parse multiple file upload

Assume you have a form with: <input type="file" .... multiple> This strategy can be often use in Angular >2.  Angular Material does not support input type file, so to enable file upload we catch click mouse event on usual material input control and trigger click on hidden input type file. If you would like to upload multiple files with this strategy into Flask server, it will be hold in ImmutableMultiDict ( more ).   This dictionary can store multiple values for the same key. For example: ImmutableMultiDict([('files', <FileStorage: '[Edward_Thorp]_Beat_the_marke.pdf' ('application/pdf')>), ('files', <FileStorage: '[Edward_Thorp]_The_mathematics_of_gambling.djvu' ('image/vnd.djvu')>), ('files', <FileStorage: ['Larry_Dressler]_Roger_Schwarz_Standing_in_the_F.pdf' ('application/pdf')>)]) If you would try ...

OpenShift Airflow Cluster

I spent some time playing with Airflow installation in OpenShift. It was a little bit tricky. Python is sensitive to run own application under not root user, as requires OpenShift Dedicated. Every pod in OpenShift Dedicated is running under not root user.   Finally, I am happy with the result. You can find it following this link . Also, made changes into the Puckel Docker image for Airflow. Created own Docker image on DockerHub. You can find the image here .