Ich lade eine Datei mit diesem Code in den Azure -Blob -Speicher hoch. Wie kann ich sicherstellen, dass der Upload abgeschlossen ist? Möglicherweise mit einem Status des Fortschritts. < /P>
Ich lade eine Datei mit diesem Code in den Azure -Blob -Speicher hoch. Wie kann ich sicherstellen, dass der Upload abgeschlossen ist? Möglicherweise mit einem Status des Fortschritts. < /P> [code] public async Task PutBlobAsync(string containerName, string blobName, byte[] content, bool allowOverwrite = false, string contentType = null) { try {
var containerClient = CreateAndGetContainer(containerName); var blobClient = containerClient.GetBlobClient(blobName);
var blobUploadOptions = new BlobUploadOptions();
if (!String.IsNullOrEmpty(contentType)) blobUploadOptions.HttpHeaders = new BlobHttpHeaders { ContentType = contentType };
if (!allowOverwrite) blobUploadOptions.Conditions = new BlobRequestConditions { IfNoneMatch = ETag.All };
using (var stream = new MemoryStream()) { stream.Write(content, 0, content.Length); stream.Position = 0; await blobClient.UploadAsync(stream, blobUploadOptions); }
Ich habe ein Problem mit der Aktualisierung eines Repos auf .net8. Das Problem liegt an einer Azure HTTPTrigger-Funktion, die an Blob Storage ausgibt. Mir ist aufgefallen, dass bei der Verwendung des...
Ich habe ein Problem mit der Aktualisierung eines Repositorys auf .NET 8. Das Problem liegt an einer Azure HttpTrigger-Funktion, die Ausgaben an Blob Storage ausgibt. Mir ist aufgefallen, dass bei...
Ich hoste eine WebApp auf Azure (Linux), die eine Verbindung zu Cosmos DB herstellt.
Wenn ich die App lokal ausführe, verwende ich azd auth login und es funktioniert perfekt. Wenn die App jedoch auf...
Ich hoste eine WebApp auf Azure (Linux), die eine Verbindung zu Cosmos DB herstellt.
Wenn ich die App lokal ausführe, verwende ich azd auth login und es funktioniert perfekt. Wenn die App jedoch auf...
Eine mit Angular gerenderte Web-App ( myapp.com )
Eine C#-REST-API, die von der Web-App aufgerufen wird ( myapi.com )
Ein Azure Blob Storage-Konto mit privaten und öffentlichen...