"""
Uploads a file to the specified project and logs the file upload.
Args:
request (HttpRequest): The HTTP request object.
Returns:
HttpResponseRedirect: Redirects to the project builder page with
the project ID.
JsonResponse: Returns a JSON response with an error message and
status code if the file is not found or an exception occurs.
Raises:
None
"""
The upper process is for the Product Owner , when he uploads the file
then the logic is it accepts the file and updates a node into the existing
project document into the firestore database and then it fetches the Url
for the uploaded file and then the log is generated. So on the project
as its file is ready for the summary.
PDF Summary - https://fastguru.ai/bots/pdf-to-summary/?api=true
PDF MCQs- https://fastguru.ai/bots/fastguru_pdf_mcqs/?api=true
PDF to MCQs logic - First user will add the pdf file then add the
number of questions they want to generate, After generating the
button. Then it will generate a number of questions which are given by
the users along with the answers.