Python REST API with Flask - Part 2 - File upload and static file serve - Source Dexter

Join the Sourcedexter Community  Community to talk about AI, machine learning, blockchain and more!


  1. Emerson Lara
    October 17, 2017 @ 4:09 pm

    I don’t know why, but the API cant find the “test.html” file on html folder…
    Look the log error: – – [17/Oct/2017 08:36:20] “GET /html/test.html HTTP/1.1” 404 –
    Have you any tip?


    • admin
      October 17, 2017 @ 10:00 pm

      There was an error in the code, lt;path:path:gt; should have been something else. I have made the changes. You can make this change as well and I think your issue will be solved.


  2. Anders
    May 8, 2018 @ 6:40 pm

    Using Flask 1.0.2, I get an error when sending a file with Postman.

    The console prints: – – [08/May/2018 15:09:37] “POST /upload HTTP/1.1″ 200 –
    ImmutableMultiDict([(”, )])

    But in Postman the Body response is “No file found”


    • Anders
      May 8, 2018 @ 6:42 pm

      Some characters are deleted, maybe this comment field doesn’t like the “greater-than” symbol.
      ImmutableMultiDict([(”, FileStorage: u’dropoffs.jpg’ (‘image/jpeg’))])


Leave a Reply

%d bloggers like this: