how to upload multiple files with flask_restful?

前端 未结 1 1368
清歌不尽
清歌不尽 2021-01-22 10:36

I\'m trying upload multiple files with flask_restful, but can\'t get the files name list in the arguments except the first file name, how can i get the files list with args?

相关标签:
1条回答
  • 2021-01-22 10:58

    Basically, just add

    action='append'

    Your code should be now: parser.add_argument('file', type=werkzeug.FileStorage, location='files',required=True, action='append')

    0 讨论(0)
提交回复
热议问题