flask-fileupload-ajax-example | Flask File Upload with jQuery Ajax | File Upload library
kandi X-RAY | flask-fileupload-ajax-example Summary
kandi X-RAY | flask-fileupload-ajax-example Summary
Simple Example. Flask File Upload with jQuery Ajax.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Upload a file to the server
- Checks if the given file is allowed
flask-fileupload-ajax-example Key Features
flask-fileupload-ajax-example Examples and Code Snippets
Community Discussions
Trending Discussions on flask-fileupload-ajax-example
QUESTION
I am a newbie in Python Flask. Although, I have done this task multiple time in PHP/Java, somehow I am stuck here.
My task is to upload the image onto server, then display the image on web page, do some processing on image and again display the processed image on client machine.
To this end, I am using the code at flask-fileupload-ajax-example on Github. I am able to show the filename as well as its size correctly using ajax on the web page. But, somehow, when I try to set the src
of tag by the path of the uploaded images, it gives a
404, File not found error
.
Following are the relevant code snippets.
In app.py
ANSWER
Answered 2018-May-24 at 11:56Try something like this Create a folder called static under the root of your application, and move your upload folder in there.
Then define your application like this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flask-fileupload-ajax-example
You can use flask-fileupload-ajax-example like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page