EulandaXtools — Funktionsreferenz
Lädt eine Datei in den Shopify Files-Bereich hoch (Staged Upload + fileCreate).
Set-ShopifyFile [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-FilePath] <string>
[[-AltText] <string>] [[-MaxRetries] <int>] [[-TimeoutSec] <int>] [<CommonParameters>]Führt einen dreistufigen Upload-Prozess durch:
1. stagedUploadsCreate (GraphQL) -- Upload-URL und Parameter anfordern
2. HTTP POST -- Datei an die staged URL hochladen
3. fileCreate (GraphQL) -- Datei in Shopify registrieren
Unterstützt gängige Dateitypen (PDF, XML, PNG, JPG, ZIP, CSV, JSON, TXT). Bei HTTP 429 oder GraphQL-Throttling wird automatisch wiederholt.
-Shop
Type: stringShopify-Shop-Domain, z.B. 'mein-shop.myshopify.com'.
-Token
Type: stringAdmin API Access Token (shpat_...) der Custom App.
-ApiVersion
Type: stringAPI-Version, z.B. '2025-01'.
-FilePath
Type: stringVollständiger Pfad zur hochzuladenden Datei.
-AltText
Type: string
Default: ''Optionaler Alternativtext für die Datei.
-MaxRetries
Type: int
Default: 3Maximale Anzahl Wiederholungen bei Rate-Limit.
-TimeoutSec
Type: int
Default: 60HTTP Timeout in Sekunden.
pscustomobject -- Objekt mit Id, Url, Alt, FileName.$file = Set-ShopifyFile -Shop 'mein-shop.myshopify.com' `
-Token 'shpat_abc123' -ApiVersion '2025-01' `
-FilePath 'C:\Rechnungen\RE-2025-001.pdf' -AltText 'Rechnung RE-2025-001'