I'm trying to get flask upload images to a folder but when I try and save it i get an error 13 Permission denied. This is the code that im using:
if request.method == "POST":
file = request.files['file']
picture_path = os.path.join(current_app.root_path,
'static/profile_pics', file.filename)
i = Image.open(file)
i.save(picture_path)
I'm pretty sure its an issue with permissions on the apache server but I'm not sure how I would fix that.