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 4b88333 commit cb088c1Copy full SHA for cb088c1
vision/src/detect_pdf_gcs.php
@@ -70,9 +70,9 @@ function detect_pdf_gcs($path, $output)
70
71
# once the request has completed and the output has been
72
# written to GCS, we can list all the output files.
73
- preg_match('/^gs:\/\/([a-z0-9\._\-]+)\/(\S+)$/', $output, $match);
+ preg_match('/^gs:\/\/([a-zA-Z0-9\._\-]+)\/?(\S+)?$/', $output, $match);
74
$bucketName = $match[1];
75
- $prefix = $match[2];
+ $prefix = isset($match[2]) ? $match[2] : '';
76
77
$storage = new StorageClient();
78
$bucket = $storage->bucket($bucketName);
0 commit comments