def _create_video_file(self, name, description, creator, contribution,
                           the_file):
        from geokey.contributions.models import VideoFile
        from django.core.files.storage import default_storage
        from django.core.files.base import ContentFile

        filename, extension = os.path.splitext(the_file.name)
        filename = self._normalise_filename(filename)

        path = default_storage.save(
            'tmp/' + filename + extension,
            ContentFile(the_file.read())
        )
        tmp_file = os.path.join(settings.MEDIA_ROOT, path)

        video_id, swf_link = self._upload_to_youtube(
            name,
            tmp_file
        )
        os.remove(tmp_file)

        return VideoFile.objects.create(
            name=name,
            description=description,
            creator=creator,
            contribution=contribution,
            video=the_file,
            youtube_id=video_id,
            youtube_link='https://www.youtube.com/embed/' + video_id,
            swf_link=swf_link
        )
Creates a new video file. Uploads the video to Youtube and returns the
dataset/ETHPy150Open ExCiteS/geokey/geokey/contributions/managers.py/MediaFileManager._create_video_file