I have written a code to upload an excel sheet and save the contents to MySQL database. Below is the code to upload the file in memory.
form = UploadFileForm(request.POST,request.FILES) if form.is_valid(): file_in_memory = request.FILES['file'].read() wb = load_workbook(filename=BytesIO(file_in_memory), data_only=True) Now, I want to upload a PDF file and save the path to the MySQL database using the same function. For instance, If excel has record A then there is an associated PDF file which I have to link. How do I handle this situation? I am aware of multi-file upload but I assume that will save the file path to the database directly. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d258610b-05dc-456e-8414-f9044b15b22d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.