nao-pon/flysystem-google-drive

How to get the real filename of the uploaded files in google drive?

EleazarFederio opened this issue · 2 comments

I Tried to get the file using Storage::disk('google)->url($myFileName); but I get false value but when I tried Storage::disk('google')->allFiles() I get a array like this [ "1BIKgS3nWmW9rrhn5gjPk5Mow2SMtPuf5", "1x_yNRPI1qEF3Llkf3_mwO0I-3DvW0MUO", "1zzGMGtAF2e8Qdyti8_-Tew8p1N3oEEi6" ] and when I get one item from the array and put it like this Storage::disk('google)->url('1x_yNRPI1qEF3Llkf3_mwO0I-3DvW0MUO'); I am able to retrieve an image from google drive, my question is how can I get the real name of the uploaded file like the array that was been return using Storage::disk('google)->url('1x_yNRPI1qEF3Llkf3_mwO0I-3DvW0MUO');?

mh19 commented

Use Storage::disk('google')->listContents() instead.
Check methods in GoogleDriveAdapter class https://github.com/nao-pon/flysystem-google-drive/blob/master/src/GoogleDriveAdapter.php

Did you try flysystem-google-drive-ext, it gets the name and file path of the files