Alteration to allow Django API to receive PDF file instead of JPG

I'm a Python developer but not a Django developer. I'm trying to get a feel for how, and how difficult, it would be to change the attached code from accepting JPGs files via the API to accepting PDF files.

Currently it errors when accepting PDFs...but works great with JPGs.

Please see the code snippets below.

Mike R.Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Walter RitzelSenior Software EngineerCommented:
Can you show the errors that you are receiving when trying to upload a PDF?
Mike R.Author Commented:
I cant show the errors anymore unfortunately :)

But this is less of a 'give me code to fix it' and more of a PM question. I'm looking for how many hours I should expect for a  devel to make this change...if that makes sense :)
Walter RitzelSenior Software EngineerCommented:
Ok. Considering the code that you have presented, I would say that 8 hours should be enough. The breakdown for this effort would be something like this:
- 2 hours for RCA (Root Cause Analysis)
- 0.5 hours for unit test planning
- 3 hours coding
- 0.5 hours for unit test validation
- 1 hour for peer review
- 1 hour for rework

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike R.Author Commented:
awesome! thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.