import requests
response = requests.post(
"https://memoryapi-production.up.railway.app/upload/file",
headers={"X-API-Key": "xinobi"},
data={"unique_id": "your-bucket-id"},
files={"file": open("photo.jpg", "rb")}
)
import requests
response = requests.post(
"https://memoryapi-production.up.railway.app/upload/file",
headers={"X-API-Key": "xinobi"},
data={
"unique_id": "your-bucket-id",
"tags": "vacation, beach"
},
files={"file": open("video.mp4", "rb")}
)
curl -X POST "https://memoryapi-production.up.railway.app/upload/file" \
-H "X-API-Key: xinobi" \
-F "unique_id=your-bucket-id" \
-F "file=@photo.jpg"
{
"uploads": {
"image": {
"code": "0000",
"msg": "success",
"data": [{ "id": "651750900880375808" }]
}
}
}
{
"uploads": {
"video": {
"code": "0000",
"msg": "success",
"data": { "videoNo": "VI651752673251721216", "videoName": "my_video" }
}
}
}
Upload
Upload File
Upload images or videos (multipart form)
POST
/
upload
/
file
import requests
response = requests.post(
"https://memoryapi-production.up.railway.app/upload/file",
headers={"X-API-Key": "xinobi"},
data={"unique_id": "your-bucket-id"},
files={"file": open("photo.jpg", "rb")}
)
import requests
response = requests.post(
"https://memoryapi-production.up.railway.app/upload/file",
headers={"X-API-Key": "xinobi"},
data={
"unique_id": "your-bucket-id",
"tags": "vacation, beach"
},
files={"file": open("video.mp4", "rb")}
)
curl -X POST "https://memoryapi-production.up.railway.app/upload/file" \
-H "X-API-Key: xinobi" \
-F "unique_id=your-bucket-id" \
-F "file=@photo.jpg"
{
"uploads": {
"image": {
"code": "0000",
"msg": "success",
"data": [{ "id": "651750900880375808" }]
}
}
}
{
"uploads": {
"video": {
"code": "0000",
"msg": "success",
"data": { "videoNo": "VI651752673251721216", "videoName": "my_video" }
}
}
}
Upload image or video files using multipart form data.
Parameters
string
required
Bucket ID to upload to
file
required
Image or video file
string
Comma-separated tags or JSON array
string
GPS latitude
string
GPS longitude
Examples
import requests
response = requests.post(
"https://memoryapi-production.up.railway.app/upload/file",
headers={"X-API-Key": "xinobi"},
data={"unique_id": "your-bucket-id"},
files={"file": open("photo.jpg", "rb")}
)
import requests
response = requests.post(
"https://memoryapi-production.up.railway.app/upload/file",
headers={"X-API-Key": "xinobi"},
data={
"unique_id": "your-bucket-id",
"tags": "vacation, beach"
},
files={"file": open("video.mp4", "rb")}
)
curl -X POST "https://memoryapi-production.up.railway.app/upload/file" \
-H "X-API-Key: xinobi" \
-F "unique_id=your-bucket-id" \
-F "file=@photo.jpg"
{
"uploads": {
"image": {
"code": "0000",
"msg": "success",
"data": [{ "id": "651750900880375808" }]
}
}
}
{
"uploads": {
"video": {
"code": "0000",
"msg": "success",
"data": { "videoNo": "VI651752673251721216", "videoName": "my_video" }
}
}
}
⌘I