Spaces:
Running
Running
Commit
·
353d91a
1
Parent(s):
ca9862a
init
Browse files
util.py
CHANGED
|
@@ -150,8 +150,8 @@ class R2Api:
|
|
| 150 |
ctype = head_dict.get(ftype, 'application/octet-stream')
|
| 151 |
headers = {"Content-Type": ctype}
|
| 152 |
|
| 153 |
-
|
| 154 |
-
cloud_path = f"
|
| 155 |
url = self.client.generate_presigned_url(
|
| 156 |
"put_object",
|
| 157 |
Params={"Bucket": self.R2_BUCKET, "Key": cloud_path, "ContentType": ctype},
|
|
|
|
| 150 |
ctype = head_dict.get(ftype, 'application/octet-stream')
|
| 151 |
headers = {"Content-Type": ctype}
|
| 152 |
|
| 153 |
+
|
| 154 |
+
cloud_path = f"ImageEdit/Uploads/{str(datetime.date.today())}/{os.path.basename(local_path)}"
|
| 155 |
url = self.client.generate_presigned_url(
|
| 156 |
"put_object",
|
| 157 |
Params={"Bucket": self.R2_BUCKET, "Key": cloud_path, "ContentType": ctype},
|