mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-16 02:16:16 +00:00
jira-15 remove commented code
This commit is contained in:
@ -10,9 +10,6 @@ def upload_image_to_alibaba(image, filename):
|
|||||||
bucket = oss2.Bucket(auth, settings.ALIYUN_OSS_ENDPOINT, settings.ALIYUN_OSS_BUCKET_NAME)
|
bucket = oss2.Bucket(auth, settings.ALIYUN_OSS_ENDPOINT, settings.ALIYUN_OSS_BUCKET_NAME)
|
||||||
# Upload the temporary file to Alibaba OSS
|
# Upload the temporary file to Alibaba OSS
|
||||||
bucket.put_object_from_file(filename, temp_file.name)
|
bucket.put_object_from_file(filename, temp_file.name)
|
||||||
print("filename====>",filename,'===>',type(filename))
|
|
||||||
new_filename = filename.replace(' ', '%20')
|
new_filename = filename.replace(' ', '%20')
|
||||||
print()
|
|
||||||
print("filename====>", filename, '===>', type(filename))
|
|
||||||
return f"https://{settings.ALIYUN_OSS_BUCKET_NAME}.{settings.ALIYUN_OSS_ENDPOINT}/{new_filename}"
|
return f"https://{settings.ALIYUN_OSS_BUCKET_NAME}.{settings.ALIYUN_OSS_ENDPOINT}/{new_filename}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user