-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload a file #35
Comments
I didn't exactly get the issue. Can you please elaborate? |
@OmkarPathak , app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/dict_output',methods = ['POST'])
def render():
if request.method == "POST":
file = request.form.get('file')
print("File:",file)
file_ext = file.split(".")[-1]
dic = {}
if file_ext == '.pdf':
data = ResumeParser(file).get_extracted_data()
else:
data = ResumeParser(file).get_extracted_data()
return data
if __name__ == '__main__':
app.run() ** here while uploading the file from anywhere from my system it's getting an error like no such a file/directory like Thanks and Regards, |
@mady143 can you also please provide your HTML where your form component is used |
@OmkarPathak , Thanks and Regards, |
Hi @OmkarPathak , now i am getting the exact total experience as bellow and also getting the experience as bellow and getting the skills can we do it and it is possible after the extract the information can you explain me how to achieve my result. |
Hi @OmkarPathak , like the above image i am trying to upload the files and get the outputs and my code looks like these are 4 screen shots i have sent all the files expect the output html file please let me know if your confused and please help me to resolve this issue. Thanks and Regards, |
@mady143 for solving the file path issue, you are only extracting First, try to open your pdf file directly. So just replace your code: pdfFileObj = open(filename, 'rb') with: pdfFileObj = open(resume_file, 'rb') If above doesn't work, try this instead. import os
filename = 'abc.pdf'
os.path.abspath(filename) If you are using Python3 you can better use: from pathlib import Path
p = Path(filename).resolve() |
Thank you @OmkarPathak for your response let me check and i will let you know if any error Thanks and Regards, |
Hi @OmkarPathak , while writing TypeError: stat: path should be string, bytes, os.PathLike or integer, not FileStorage how to rectify it can you explain Thanks and Regards, |
This article might help you: https://viveksb007.github.io/2018/04/uploading-processing-downloading-files-in-flask |
can you explain/or any solution for this issue |
Hi @OmkarPathak ,
I am using flask framework i am trying to upload file and extract the info from that file but i am facing an issue related to that i.e, i was only able to upload the files which are present in the same folder i.e, where app.py is located when ever i was trying to upload from different location it was not uploading it was showing an error
can you help me to resolve this issue...
Thanks and Regards,
Manikantha Sekhar..
The text was updated successfully, but these errors were encountered: