Base64-Datei-Upload
curl --request POST \
--url https://files-api.evolink.ai/api/v1/files/upload/base64 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64_data": "data:image/png;base64,iVBORw0KGgo..."
}
'import requests
url = "https://files-api.evolink.ai/api/v1/files/upload/base64"
payload = { "base64_data": "data:image/png;base64,iVBORw0KGgo..." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base64_data: 'data:image/png;base64,iVBORw0KGgo...'})
};
fetch('https://files-api.evolink.ai/api/v1/files/upload/base64', 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/base64",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base64_data' => 'data:image/png;base64,iVBORw0KGgo...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/base64"
payload := strings.NewReader("{\n \"base64_data\": \"data:image/png;base64,iVBORw0KGgo...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/base64")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64_data\": \"data:image/png;base64,iVBORw0KGgo...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://files-api.evolink.ai/api/v1/files/upload/base64")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base64_data\": \"data:image/png;base64,iVBORw0KGgo...\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"msg": "Datei erfolgreich hochgeladen",
"data": {
"file_id": "file_abc123",
"file_name": "avatar.png",
"original_name": "avatar.png",
"file_size": 2048,
"mime_type": "image/png",
"upload_path": "avatars",
"file_url": "https://files.evolink.ai/avatars/avatar.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
Base64-Datei-Upload
- Unterstützt Base64-Kodierung und Data-URL-Formate
- Erkennt Dateitypen automatisch und kategorisiert die Speicherung
- Gibt zugängliche Datei-URLs und Download-Links zurück
- 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
/
base64
Base64-Datei-Upload
curl --request POST \
--url https://files-api.evolink.ai/api/v1/files/upload/base64 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64_data": "data:image/png;base64,iVBORw0KGgo..."
}
'import requests
url = "https://files-api.evolink.ai/api/v1/files/upload/base64"
payload = { "base64_data": "data:image/png;base64,iVBORw0KGgo..." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base64_data: 'data:image/png;base64,iVBORw0KGgo...'})
};
fetch('https://files-api.evolink.ai/api/v1/files/upload/base64', 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/base64",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base64_data' => 'data:image/png;base64,iVBORw0KGgo...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/base64"
payload := strings.NewReader("{\n \"base64_data\": \"data:image/png;base64,iVBORw0KGgo...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/base64")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64_data\": \"data:image/png;base64,iVBORw0KGgo...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://files-api.evolink.ai/api/v1/files/upload/base64")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base64_data\": \"data:image/png;base64,iVBORw0KGgo...\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"code": 200,
"msg": "Datei erfolgreich hochgeladen",
"data": {
"file_id": "file_abc123",
"file_name": "avatar.png",
"original_name": "avatar.png",
"file_size": 2048,
"mime_type": "image/png",
"upload_path": "avatars",
"file_url": "https://files.evolink.ai/avatars/avatar.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
application/json
Base64-kodierte Dateidaten
Unterstützte Formate:
- Data-URL-Format:
data:image/png;base64,iVBORw0KGgo... - Reine Base64-Kodierung:
iVBORw0KGgo...
Hinweis:
- Maximal
1Bild pro Anfrage - Derzeit werden nur Dateien in folgenden Formaten unterstützt:
image/jpeg,image/png,image/gif,image/webp
Beispiel:
"data:image/png;base64,iVBORw0KGgo..."
Benutzerdefinierter Upload-Pfad
Hinweis:
- Wenn nicht angegeben, kategorisiert das System automatisch basierend auf dem Dateityp
Beispiel:
"avatars"
Benutzerdefinierter Dateiname
Hinweis:
- Wenn nicht angegeben, generiert das System automatisch einen eindeutigen Dateinamen
Beispiel:
"avatar.png"