We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3966d8d commit c525a05Copy full SHA for c525a05
vision/snippets/detect/detect.py
@@ -849,8 +849,9 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):
849
850
bucket = storage_client.get_bucket(bucket_name)
851
852
- # List objects with the given prefix.
853
- blob_list = list(bucket.list_blobs(prefix=prefix))
+ # List objects with the given prefix, filtering out folders.
+ blob_list = [blob for blob in list(bucket.list_blobs(
854
+ prefix=prefix)) if not blob.name.endswith('/')]
855
print('Output files:')
856
for blob in blob_list:
857
print(blob.name)
0 commit comments