Skip to content

newnewcoder/flask-upload-and-store-to-mysql-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Flask upload file and store to Mysql Demo

How to run

Setup Mysql

step 1 install mysql

docker run --name upload_demo_db -e MYSQL_ROOT_PASSWORD=abc123 -p 3306:3306 -d mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

step 2 setup database

CREATE DATABASE `mydb`;
USE `mydb`;
CREATE TABLE `upload_demo` (
`id` integer AUTO_INCREMENT PRIMARY KEY,
`file` LONGBLOB
) ENGINE=InnoDB
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Run Flask app

pip install -r requirements.txt
./run.sh

go http://localhost:5000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •