Transloadit
Tarifs
  • Téléversements de fichiers
  • Importation de fichiers
  • Traitement par lots (English)
  • Encodage vidéo
  • Encodage audio
  • Traitement d’images
  • Traitement de documents
  • Intelligence artificielle
  • Filtrage et sécurité des fichiers
  • Catalogage de médias
  • Compression de fichiers
  • Évaluation de code
  • Exportation de fichiers
  • Smart CDN
  • Voir tous les services
  • Explorer les intégrations (English)
  • Explorer les démos interactives (English)
  • Uppy
  • TransloaditKit
  • SDK Android
  • SDK Node.js
  • SDK Python
  • SDK Ruby
  • SDK Go
  • SDK Java
  • SDK PHP
  • Zapier
  • Serveur MCP
  • Transloadit CLI (English)
  • Terraform
  • Essentiels
  • Bonnes pratiques (English)
  • FAQ
  • Robots (English)
  • API
  • Formats (English)
  • Créer votre première application
  • À propos de Transloadit
  • Comparatifs (English)
  • Projets open source
  • Témoignages
  • Carrières (English)
  • Sécurité (English)
  • Articles (English)
  • Actus dev (English)
  • Astuces dev
  • Presse (English)
  • Recherche (English)
  • Études de cas (English)
  • Solutions (English)
  • Guides (English)
  • Glossaire (English)
  • Juridique (English)
  • Outils (English)
  • Aider Coursera à apporter l’éducation à des millions de personnes à travers le monde (English)
  • Support Transloadit
  • Support open source
  • Accord de niveau de service (English)
EssentielsRobotsEN (English)FAQAPIFormatsEN (English)Bonnes pratiquesEN (English)
Premiers pas
  • Vue d’ensemble
  • Ma première application
  • Saving result filesEN (English)
Sujets
  • Assembly InstructionsEN (English)
  • Assembly VariablesEN (English)
  • Dynamic EvaluationEN (English)
  • TemplatesEN (English)
  • WebhooksEN (English)
  • Third party CredentialsEN (English)
  • Builtin TemplatesEN (English)
  • Resize StrategiesEN (English)
  • Assembly Execution ProgressEN (English)
  • WorkspacesEN (English)
  • AI AgentsEN (English)
  • Advanced use ParameterEN (English)
  • The ignore_errors ParameterEN (English)
Kits de développement logiciel
  • Vue d’ensemble
  • SDK Android
  • Navigateurs
  • Convex
  • cURL
  • SDK Go
  • SDK Java
  • Serveur MCP
  • Formulaire multipart
  • SDK Node.js
  • SDK PHP
  • SDK Python
  • SDK Ruby
  • Terraform
  • TransloaditKit
  • Intégration Zapier
Migration
  • Migrate from Cloudinary to TransloaditEN (English)
  • Migrate from Uploadcare to TransloaditEN (English)
  • Migrate from Mux to TransloaditEN (English)
  • Migrate from Filestack to TransloaditEN (English)

SDK Go

transloadit/go-sdk⁠

Nous proposons un client Go puissant qui facilite l’utilisation de Transloadit.

Installer

go get github.com/transloadit/go-sdk

La compatibilité du SDK Go avec Go 1.11 ou une version ultérieure est confirmée.

Utilisation

package main

import (
	"context"
	"fmt"

	"github.com/transloadit/go-sdk"
)

func main() {
	// Create client
	options := transloadit.DefaultConfig
	options.AuthKey = "YOUR_TRANSLOADIT_KEY"
	options.AuthSecret = "YOUR_TRANSLOADIT_SECRET"
	client := transloadit.NewClient(options)

	// Initialize new assembly
	assembly := transloadit.NewAssembly()

	// Add a file to upload
	assembly.AddFile("image", "/PATH/TO/FILE.jpg")

	// Add Instructions, e.g. resize image to 75x75px
	assembly.AddStep("resize", map[string]interface{}{
		"robot":           "/image/resize",
		"width":           75,
		"height":          75,
		"resize_strategy": "pad",
		"background":      "#000000",
	})

	// Start the upload
	info, err := client.StartAssembly(context.Background(), assembly)
	if err != nil {
		panic(err)
	}

	// All files have now been uploaded and the assembly has started but no
	// results are available yet since the conversion has not finished.
	// WaitForAssembly provides functionality for polling until the assembly
	// has ended.
	info, err = client.WaitForAssembly(context.Background(), info)
	if err != nil {
		panic(err)
	}

	fmt.Printf("You can view the result at: %s\n", info.Results["resize"][0].SSLURL)
}

Exemple

Pour des exemples entièrement fonctionnels d’utilisation des Templates, du traitement non bloquant et d’autres fonctionnalités, consultez examples/⁠.

Documentation

Consultez Godoc⁠ pour accéder à la documentation complète de l’API.

Page précédente ← cURLPage suivante SDK Java →
Contacter le support⁠

TransloaditVérification de l’état…

Produit

  • Services
  • Tarifs
  • Démos EN (English)
  • Outils EN (English)
  • Sécurité EN (English)
  • Support

Entreprise

  • À propos de Transloadit/Presse EN (English)
  • Blog EN (English)/Carrières EN (English)
  • Comparatifs EN (English)/Matrice de conformité EN (English)
  • Recherche EN (English)
  • Projets open source
  • Solutions EN (English)
  • Pionniers du web EN (English)

Documentation

  • Premiers pas
  • Transcodage EN (English)
  • FAQ
  • API
  • Guides EN (English)/Astuces dev
  • Formats pris en charge EN (English)

Plus

  • État de la plateforme⁠
  • Forum de la communauté⁠
  • StackOverflow⁠
  • Uppy
  • tus⁠

© 2009–2026 Transloadit-II GmbH

Confidentialité EN (English)Conditions EN (English)Mentions légales EN (English)
EnglishDeutschEspañolFrançaisPortuguês (Brasil)