[Ndn-lib] Downloading files fetched by ndn-js

Junxiao Shi shijunxiao at email.arizona.edu
Tue Apr 3 08:15:47 PDT 2018


Hi Susmit

I was wondering if there are any practical limitations to the floowing
> approach.
>
> I have a webpage that is fetched over IP. The webpage allows users
> to select a file which is then requested using ndn-js. Is there a way to
> download and save the file to local filesystem?


Certainly. You can convert the payload into a *data:* or *blob:* URI (HomeCam
does that <https://yoursunny.com/t/2017/how-homecam-works/>), assign it to
href attribute of an <a> element
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a>, and assign
the filename to download attribute.

I remember there was a filesize limit  (~2GB?) that could be downloaded.
>
It's Chrome's limitation <https://stackoverflow.com/a/43816041>. Firefox
could create a larger BLOB.

Yours, Junxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-lib/attachments/20180403/2bb4f715/attachment.html>


More information about the Ndn-lib mailing list