如何使用本地存储从 html5 存储或 JQuery 下载二进制/视频文件
我读了很多关于 JQuery、html5 LocalStorage 的文章,但我还没有得到我想要的。
这是我的疑问:我有一些属于视频一部分的网址(格式无关紧要),我想将这些文件下载为 cookie 或临时文件,无论它们是否保存为二进制文件,或者电影文件。
我知道可以下载字符串并将其保存为cookie。但是,我该怎么做呢?
我也一直在看 JQuery lib,但我还做不到。
任何帮助将不胜感激。
我最诚挚的问候, 安东尼奥
I have been reading so much articles about JQuery, html5 LocalStorage but I could not get what I want yet.
This is my doubt: I have some url that are part of a video (the format does not matter) and I would like to download those files as cookies or as temporally files, it does not matter if they are save as binary file, or movie file.
I know that is possible to download string and save it as cookies. But, how can I do this?
I have also been looking at JQuery lib, but I could not do it yet.
Any help would be appreciate.
My best regards,
Antonio
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这确实很旧,但我自己查找这个问题的答案并发现了这一点:
HTML5 存储不允许您存储二进制数据。因此,如果您想存储视频,则需要将整个视频编码为 Base64,然后将其存储为文本。
I know this is really old but I was looking up the answer to this question myself and found this out:
HTML5 storage does not allow you to store binary data. So if you wanted to store a video you would need to encode the entire video into Base64 and then store it as text.