Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Cloud Storage'a yüklediğiniz dosyaları daha sonra silebilirsiniz.
Dosya silme
Bir dosyayı silmek için önce o dosyanın referansını oluşturun. Ardından, bu referansta delete() yöntemini çağırın.
// Create a reference to the file to deletefinaldesertRef=storageRef.child("images/desert.jpg");// Delete the fileawaitdesertRef.delete();
Hataları İşleme
Dosya silme işlemlerinde hataların oluşmasının çeşitli nedenleri vardır. Örneğin, dosyanın mevcut olmaması veya kullanıcının belirtilen dosyayı silme izninin olmaması. Hatalar hakkında daha fazla bilgiyi dokümanların Hataları İşleme bölümünde bulabilirsiniz.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-25 UTC."],[],[],null,["\u003cbr /\u003e\n\nAfter uploading files to Cloud Storage, you can also delete them.\n| **Note:** By default, a Cloud Storage for Firebase bucket requires Firebase Authentication to perform any action on the bucket's data or files. You can change your Firebase Security Rules for Cloud Storage to [allow unauthenticated access for specific situations](/docs/storage/security/rules-conditions#public). However, for most situations, we strongly recommend [restricting access and setting up robust security rules](/docs/storage/security/get-started) (especially for production apps). Note that if you use Google App Engine and have a default Cloud Storage bucket with a name format of `*.appspot.com`, you may need to consider [how your security rules impact access to App Engine files](/docs/storage/gcp-integration#security-rules-and-app-engine-files).\n\nDelete a File\n\nTo delete a file, first [create a reference](/docs/storage/flutter/create-reference)\nto that file. Then call the `delete()` method on that reference. \n\n // Create a reference to the file to delete\n final desertRef = storageRef.child(\"images/desert.jpg\");\n\n // Delete the file\n await desertRef.delete();\n\n| **Note:** Deleted files are typically recoverable for 7 days with [soft delete](https://cloud.google.com/storage/docs/soft-delete), which is enabled by default.\n\nHandle Errors\n\nThere are a number of reasons why errors may occur on file deletes,\nincluding the file not existing, or the user not having permission\nto delete the specified file. More information on errors can be found in the\n[Handle Errors](/docs/storage/flutter/handle-errors) section of the docs."]]