def _remove_extension_for_non_raw_file(self, name):
file_resource_type = self._get_resource_type(name)<EOL>if file_resource_type is None or file_resource_type == self.RESOURCE_TYPE:<EOL><INDENT>return name<EOL><DEDENT>else:<EOL><INDENT>extension = self._get_file_extension(name)<EOL>return name[:-len(extension) - <NUM_LIT:1>]<EOL><DEDENT>
Implemented as image and video files' Cloudinary public id
shouldn't contain file extensions, otherwise Cloudinary url
would contain doubled extension - Cloudinary adds extension to url
to allow file conversion to arbitrary file, like png to jpg.