MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / save_file

Method save_file

core/storage.py:300–308  ·  view source on GitHub ↗
(self, file: UploadFile, save_path: str)

Source from the content-addressed store, hash-verified

298 )
299
300 async def save_file(self, file: UploadFile, save_path: str):
301 async with self._client() as s3:
302 # 使用 upload_fileobj 流式上传,避免将整个文件加载到内存
303 await s3.upload_fileobj(
304 file.file,
305 self.bucket_name,
306 save_path,
307 ExtraArgs={"ContentType": file.content_type or "application/octet-stream"},
308 )
309
310 async def delete_file(self, file_code: FileCodes):
311 async with self._client() as s3:

Callers 3

share_fileFunction · 0.45
presign_upload_proxyFunction · 0.45
share_local_fileMethod · 0.45

Calls 1

_clientMethod · 0.95

Tested by

no test coverage detected