Files
RasadDam_Backend/common/helpers.py

8 lines
194 B
Python

import typing
def detect_file_extension(file_name: str) -> typing.AnyStr:
""" detect extension of a file like: jpg, png, pdf """
extended = file_name.split('.')
return extended[1]