MCPcopy
hub / github.com/diffgram/diffgram / upload_video_file

Method upload_video_file

walrus/methods/video/video.py:69–86  ·  view source on GitHub ↗
(
        self,
        video_file_name,
        extension,
        video)

Source from the content-addressed store, hash-verified

67 self.highest_frame_encountered = None
68
69 def upload_video_file(
70 self,
71 video_file_name,
72 extension,
73 video):
74
75 video.file_blob_path = settings.PROJECT_VIDEOS_BASE_DIR + \
76 str(self.project.id) + "/" + str(video.id)
77
78 data_tools = Data_tools().data_tools
79 data_tools.upload_to_cloud_storage(
80 temp_local_path = video_file_name,
81 blob_path = video.file_blob_path,
82 content_type = f"video/{str(extension[1:])}",
83 timeout = 60 * 10
84 )
85
86 video.file_signed_url = data_tools.build_secure_url(video.file_blob_path, 2592000)
87
88 def check_free_tier_frame_count(self, frame_count):
89

Callers 1

loadMethod · 0.95

Calls 3

Data_toolsClass · 0.90
build_secure_urlMethod · 0.45

Tested by

no test coverage detected