I have a Simple Http request Handler in python and want to disallow upload of files with extension .html and .svg. How proceed | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I have a Simple Http request Handler in python and want to disallow upload of files with extension .html and .svg. How proceed

12th Jul 2022, 4:44 AM
Ajay
2 Answers
+ 1
Your questions is incomplete and improper. Reframe your questions and include all necessary details. Checkout these posts to get tips to frame a better question. https://www.sololearn.com/Discuss/3021159/?ref=app https://www.sololearn.com/post/488985/?ref=app
12th Jul 2022, 7:49 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
If i understand correctly your problem, i would suggest using assert keyword and not try/except blocks as you are not trying to catch an exception, but create one.
12th Jul 2022, 9:00 AM
Herr Rozwel
Herr Rozwel - avatar