Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
App Engine API untuk Cloud Storage Tools menyediakan metode yang mudah untuk menyajikan file gambar:
CloudStorageTools.getImageServingUrl()
CloudStorageTools.deleteImageServingUrl()
Salah satu keuntungan menggunakan metode ini untuk menyajikan gambar daripada membuat file menjadi publik adalah kemampuan untuk mengubah ukuran dan memangkas secara dinamis, tanpa perlu menyimpan gambar dalam ukuran yang berbeda.
CloudStorageTools::getImageServingUrl menampilkan URL penyajian untuk gambar. Jika gambar akan ditampilkan dalam halaman HTTPS, tetapkan secure_url ke True untuk menghindari peringatan konten campuran.
Perhatikan bahwa URL ini dapat dibaca secara publik oleh semua orang, tetapi tidak "dapat ditebak".
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-04-03 UTC."],[[["The App Engine API offers `CloudStorageTools.getImageServingUrl()` to generate URLs for serving images stored in Cloud Storage, and `CloudStorageTools.deleteImageServingUrl()` to stop serving them."],["Using `getImageServingUrl` allows for dynamic resizing and cropping of images without needing to store multiple image sizes, offering a significant advantage over directly making files public."],["Only the first app that calls `getImageServingUrl` can serve a specific image; subsequent apps must copy the image first if they need to serve it."],["Setting `secure_url` to `True` when using `getImageServingUrl` ensures the image can be displayed on HTTPS pages without mixed-content warnings."],["To remove the actual file you must use the PHP `unlink()` function and not the `deleteImageServingUrl`."]]],[]]