Spaces:
Sleeping
Sleeping
Upload cloud_download.py
Browse files- cloud_download.py +18 -0
cloud_download.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import cloudinary.api
|
2 |
+
|
3 |
+
# Assuming you have already configured Cloudinary with your credentials
|
4 |
+
cloudinary.config(
|
5 |
+
cloud_name = "djepbidi1",
|
6 |
+
api_key = "531731913696587",
|
7 |
+
api_secret = "_5ePxVQEECYYOukhSroYXq7eKL0"
|
8 |
+
)
|
9 |
+
|
10 |
+
public_id = 'test'
|
11 |
+
|
12 |
+
# Fetch the asset's details
|
13 |
+
asset_details = cloudinary.api.resource(public_id, resource_type='video')
|
14 |
+
|
15 |
+
# Extract the secure URL of the asset
|
16 |
+
asset_url = asset_details.get('secure_url')
|
17 |
+
|
18 |
+
print("Asset URL:", asset_url)
|