LiveSDK: C # how to get file size before downloading

I was wondering how to get the file size from Skydrive before downloading so that the application can decide whether or not to download according to the file size.

Thanks!

+4
source share
2 answers

Microsoft.Live.DynamicDictionary has everything I wanted. The dictionary has a key for "size".

Here are all 16 keys

  • ID
  • from
  • name
  • Description
  • parent_id
  • the size
  • upload_location
  • comments_count
  • comments_enabled
  • is_embeddable
  • number
  • link
  • of type
  • shared_with
  • created_time
  • updated_time
+2
source

As Sander said, getting the file size may vary depending on your type of implementation. For me, I use HttpClient requests and responses. As soon as I receive a response from skydrive, I can read the number of bytes in the contents of the file before downloading it and provide the user with information about the file size before starting the download.

0
source

Source: https://habr.com/ru/post/1482918/


All Articles