Dateistream-Upload
curl --request POST \
--url https://files-api.evolink.ai/api/v1/files/upload/stream \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://files-api.evolink.ai/api/v1/files/upload/stream"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '@/path/to/file.png');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://files-api.evolink.ai/api/v1/files/upload/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://files-api.evolink.ai/api/v1/files/upload/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://files-api.evolink.ai/api/v1/files/upload/stream"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://files-api.evolink.ai/api/v1/files/upload/stream")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://files-api.evolink.ai/api/v1/files/upload/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"msg": "Datei erfolgreich hochgeladen",
"data": {
"file_id": "file_abc123",
"file_name": "photo.png",
"original_name": "photo.png",
"file_size": 2048,
"mime_type": "image/png",
"upload_path": "photos",
"file_url": "https://files.evolink.ai/photos/photo.png",
"download_url": "https://files.evolink.ai/api/v1/files/download/file_abc123",
"upload_time": "2025-10-09T00:00:00+08:00",
"expires_at": "2025-10-12T00:00:00+08:00"
}
}File Upload
Dateistream-Upload
- Dateien im multipart/form-data-Format hochladen
- Unterstützt sowohl Unterstrich- als auch camelCase-Parameterbenennung
- Geeignet zum direkten Hochladen lokaler Dateien
- Dateien verfallen nach 72 Stunden
- Das aktuelle Benutzerkontingent ist begrenzt. Uploads schlagen fehl, wenn das Kontingent erschöpft ist. Bitte speichern Sie lokal, wenn dauerhafte Speicherung benötigt wird
Hinweis:
Die Basis-URL der Datei-Upload-API ist https://files-api.evolink.ai
POST
/
api
/
v1
/
files
/
upload
/
stream
Dateistream-Upload
curl --request POST \
--url https://files-api.evolink.ai/api/v1/files/upload/stream \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://files-api.evolink.ai/api/v1/files/upload/stream"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '@/path/to/file.png');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://files-api.evolink.ai/api/v1/files/upload/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://files-api.evolink.ai/api/v1/files/upload/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://files-api.evolink.ai/api/v1/files/upload/stream"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://files-api.evolink.ai/api/v1/files/upload/stream")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://files-api.evolink.ai/api/v1/files/upload/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.png\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"msg": "Datei erfolgreich hochgeladen",
"data": {
"file_id": "file_abc123",
"file_name": "photo.png",
"original_name": "photo.png",
"file_size": 2048,
"mime_type": "image/png",
"upload_path": "photos",
"file_url": "https://files.evolink.ai/photos/photo.png",
"download_url": "https://files.evolink.ai/api/v1/files/download/file_abc123",
"upload_time": "2025-10-09T00:00:00+08:00",
"expires_at": "2025-10-12T00:00:00+08:00"
}
}Autorisierungen
##Alle APIs erfordern Bearer-Token-Authentifizierung##
API-Schlüssel erhalten:
Besuchen Sie die API-Schlüsselverwaltungsseite, um Ihren API-Schlüssel zu erhalten
Zum Anfrage-Header hinzufügen:
Authorization: Bearer YOUR_API_KEY
Body
multipart/form-data
Binäre Dateidaten
Hinweis:
- Upload im form-data-Format
- System erkennt den Dateityp automatisch
- Maximal
1Bild pro Anfrage - Derzeit werden nur Dateien in folgenden Formaten unterstützt:
image/jpeg,image/png,image/gif,image/webp
Benutzerdefinierter Upload-Pfad
Hinweis:
- Unterstützt Unterstrich-Benennung:
upload_path - Unterstützt camelCase-Benennung:
uploadPath - Wenn nicht angegeben, kategorisiert das System automatisch basierend auf dem Dateityp
Beispiel:
"photos"
Benutzerdefinierter Dateiname
Hinweis:
- Unterstützt Unterstrich-Benennung:
file_name - Unterstützt camelCase-Benennung:
fileName - Wenn nicht angegeben, generiert das System automatisch einen eindeutigen Dateinamen
Beispiel:
"photo.png"