Forums

Files Saved In static folder gets saved outside mysite folder

Hello I am new to python anywhere kindly assist i have hosted a basic Flask app at http://lpc22.pythonanywhere.com/ here the issue I getting is when a user adds a profile picture on his profile I am storing the images in static folder/username folder this works fine locally but when the app is uploaded here the file gets saved in a extra folder named static which is outside mysite folder expected is the file should have been saved inside the static folder present inside mysite directory how can i fix this kindly help

You may need to use absolute path not relative one.