nao-pon / flysystem-google-drive

Flysystem adapter for Google Drive
MIT License
352 stars 128 forks source link

Read filename by id ? #98

Closed foremtehan closed 3 years ago

foremtehan commented 3 years ago

When i do Storage::disk('google')->allFiles() the result is:

array:8 [
  0 => "1ICxYN0ELxkAJ9IGqWANf7YXpPiVoudXK"
  1 => "1jHWlPQ3P9EgUG4WJVEklLtmhzDsUEkdD"
  2 => "1Kc9h_NvOTNJ09WYQV6XyZhDFxKxHtunK"
  3 => "1kGycmkSUEGNXEk_tnJBY4eirSQtTl3X-"
  4 => "1NE_dtBzBI3ZE0jpBZYJWx4czwQRNQpnj"
  5 => "1rxRgjedR5UZ_yKXV-voiMhrLkrkbtW2A"
  6 => "1SwFGkMwuJLHcGH_CYh7Mb8sHajOl-piI"
  7 => "1uXby3kLE62z1j6sIyqX3C_Cy8TfiGmDI"
]

So how can i convert them to real filename with all detail ?

PaolaRuby commented 3 years ago

Package can't do that directly, yo have to iterate items and use getMetadata for each one, or use a packet that does it automatically like masbug/flysystem-google-drive-ext, it has the same config a get the display normal path, if it works, you can give a ⭐