ericyd / gdrive-copy

Web app to copy a Google Drive folder
https://script.google.com/macros/s/AKfycbxbGNGajrxv-HbX2sVY2OTu7yj9VvxlOMOeQblZFuq7rYm7uyo/exec
MIT License
1.58k stars 343 forks source link

Size of each file and total size of the folder to be copied. #81

Open vaccarieli opened 5 years ago

vaccarieli commented 5 years ago

Are you requesting a feature or reporting a bug?

A feature.

What kind feature would you like?

To have the size of each file written in the spreadsheet and once selected the folder to be copied show the total size of it.

ericyd commented 5 years ago

I'm pretty confident this isn't exposed through the API, but I'll dig around and see if this would be an easy addition.

I'm not inclined to write a special method to calculate this, so if it isn't available from the API this will probably not be done

vaccarieli commented 5 years ago

Thanks for your response, I just submitted an issue regarding the lack of this feature, I wish I know more to be more supportive.

ericyd commented 5 years ago

Looks like the Drive API does return this data, e.g.

   "fileSize": "1006084",
   "quotaBytesUsed": "1006084",

Native Google types don't take up space, but it seems this is returned for all other file types. I'll work on getting this implemented, should be pretty straitforward

vaccarieli commented 5 years ago

Alright, do u have a discord ? I like your job seems pretty good.

ericyd commented 5 years ago

No, I had to google discord just now :joy:, never heard of it before

vaccarieli commented 5 years ago

No worries I'll look forward to see the update, thanks man. :)

ericyd commented 5 years ago

This is partially done with #84 . I added logging for file size when it exists.

I am going to be working on a larger update to track the overall size of the copy to address #85 too.