I know how to get the file size using REST API, basically this here:
https://tenant.sharepoint.com/sites/site_name/_api/web/GetFileByServerRelativePath(decodedurl='/sites/site_name/Lists/ListName/Attachments/1/Airbus_Pleiades_50cm_8bit_RGB_Yogyakarta.jpg')/Length
But for the love of me I can't figure out how to do this using PnP JS.
Any help would be appreciated.
The official doc is not much help here: https://pnp.github.io/pnpjs/sp/files/
I will use the RAW REST API for now but really would like to know how to use PnP SP for that
knownLength
from file stream. Let me know if this works for you.