sunlight0602 / Grade-Report-and-Analysis

0 stars 1 forks source link

feat: upload/process & to MariaDB #12

Open sunlight0602 opened 1 week ago

sunlight0602 commented 1 week ago
  1. upload API
  2. process the excel
  3. save result to MariaDB
TWcamel commented 1 week ago

ths api spec is mensioned in #13

TWcamel commented 1 week ago

how to use 12-feat-uploadprocess-to-mariadb feature branch

  1. python Server.py
  2. use curl to test api and will see the result as below:
    curl -X POST http://localhost:8000/apiv1/exam \
    -H "Content-Type: multipart/form-data" \
    -F "file=@/path/to/your/file.xlsx"
    image

remark:

curl --help

-X POST: Specifies that we're making a POST request.
http://localhost:8000/apiv1/exam: The URL of your API endpoint.
-H "Content-Type: multipart/form-data": Sets the content type for file upload.
-F "file=@/path/to/your/file.xlsx": Specifies the file to upload. The @ symbol tells curl to read the file from disk.