Skip to content

Commit

Permalink
fix(client): urlencode filename before uploading file, fix #292 (#294)
Browse files Browse the repository at this point in the history
* fix(client): urlencode file name

#292

* refactor(client): move encoding filename to post method

* test(client): split client.post test into unit test and integration test

* test(windows): set PYTHONIOENCODING to utf-8

* fix(client): check name attribute before urlencoding filename

* test(client): create a fake picture file for related tests

* style(client): correct coding style

* fix(client): urlencode filenames for all files in "files" before upload

* refactor(client): refactor urlencode to reduce block nest and make it more pythonic

* style(client): fix client style problem
  • Loading branch information
helloqiu authored and whtsky committed May 9, 2018
1 parent 576f163 commit c7ab24d
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 56 deletions.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install:
- redis-server --service-start
- set DATABASE_MYSQL_USERNAME=root
- set DATABASE_MYSQL_PASSWORD=Password12!
- set PYTHONIOENCODING=utf-8
before_test:
- ps: $env:MYSQL_PWD="Password12!"
- ps: $cmd = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -e "create database werobot;" --user=root'
Expand All @@ -31,4 +32,4 @@ on_failure:
notifications:
- provider: Slack
incoming_webhook:
secure: OUWL/ky2abFxup5CTKyGrmQRdqAE/TU5To/6bxxvS6GRaV6/JdyKyfxZHwnB1HOIg805obLeC4ngnSNEUd87to9JLSerBUb5b3VjYieuJVY=
secure: OUWL/ky2abFxup5CTKyGrmQRdqAE/TU5To/6bxxvS6GRaV6/JdyKyfxZHwnB1HOIg805obLeC4ngnSNEUd87to9JLSerBUb5b3VjYieuJVY=
Loading

0 comments on commit c7ab24d

Please sign in to comment.