Basically I'm working in php laravel.
I've just started to work with Flask. I'm developing API in Flask. I'm trying to upload image file from Api to the Ubuntu server. Also I wanted to share image url.
Following code is working locally but not able to retrieve image from URL. Same code is working in ubuntu but image is not getting stored in said location. I'm thinking I'm not giving proper path.
file = request.files['file']
file_name = str(current_user.id) +".jpg"
file.save(os.path.join("static/corporate_employee_images/", file_name))
I tried to store image content in database and retrieve but that too isn't working.getting read_image not found error.
I just wanted to upload image and return its url. In above case
http://127.0.0.1:5000/static/corporate_employee_images/10.jpg
How can I achieve this.
Please guide.
Thanks