blob

Angular与.NET Webapi 文件下载

佐手、 提交于 2019-11-28 22:33:20
angular代码 function download(method, url, params, data) { //$scope.excelinfo = {}; var httpval = { method: method, //"POST", url: url, //"http://localhost:xxx/api/xxx/xxx/ExportExcelApply", responseType: "blob", headers: { 'Content-Type': 'application/json; charset=UTF-8' }, params: params, data: data //$scope.excelinfo }; $http(httpval).then(function (res) { var filename = res.headers("Content-Disposition").split(";")[1].split("filename=")[1]; var fileNameUnicode = res.headers("Content-Disposition").split("filename*=")[1]; if (fileNameUnicode) { //当存在 filename* 时,取filename* 并进行解码(为了解决中文乱码问题)

Windows Azure Storage Certificate Expired

≯℡__Kan透↙ 提交于 2019-11-28 22:19:14
The certificate for our Azure blob storage expired today. This is not a certificate provided by us but provided by Microsoft as show in the picture below. How does one go about fixing this? I have tried searching for a solution but found nothing. Our app cannot connect to the storage as the certificate has expired and we are getting an error indicating: Could not establish trust relationship for the SSL/TLS secure channel dr. foot fist headknocker As a temporary measure I was able to log into the azure portal and change the protocol part of the connection string from https to http. Two more

vue 文件下载(需调用接口)

拜拜、爱过 提交于 2019-11-28 22:13:16
methods:{ //下载文件 filerightDown(index,fileName) {//index 接口参数 fileName文件名字 var _this = this; var fileName = fileName; this.$http({ method: "post", url: this.HOST + api.download, params: { fileId: index }, responseType:'arraybuffer' }) .then(res => { this.download(res.data,fileName); }) .catch(req => { console.log("下载失败", req); }); }, // 下载文件 download (data,fileName) { if (!data) { return } let url = window.URL.createObjectURL(new Blob([data])); let link = document.createElement('a'); link.style.display = 'none'; link.href = url; link.setAttribute('download', fileName); document.body.appendChild

Springboot +vue 实现导出功能

ぃ、小莉子 提交于 2019-11-28 22:12:16
最近在工作遇到vue和Springboot 实现导出功能,翻看很多资料,发现一些博客写法都过时了,所以自己特此记录下,使用版本vue2,Springboot 2x以上,chrome浏览器 76.0.3809.100 vue 2写法 let blob = new Blob([res.data], { type: 'application/octer-stream' }); 其中我发现很多博客用这样的写法,但是我发现打印res的时候没有发现data这个参数,总是报错后面直接用res就好了。 正确写法let blob = new Blob([res], { type: 'application/octer-stream' }); 科普一下:axios中params和data两者,以为他们是相同的,实则不然。 因为params是添加到url的请求字符串中的,而data是添加到请求体(body)中的,最好使用params参数 import axios from 'axios' axios({ method: 'post', url: '/user/excelExport', responseType:‘blob’, params }).then(res => { const link = document.createElement('a') let blob = new Blob([res

Is it possible to merge multiple webm blobs/clips into one sequential video clientside?

戏子无情 提交于 2019-11-28 22:07:28
I already looked at this question - Concatenate parts of two or more webm video blobs And tried the sample code here - https://developer.mozilla.org/en-US/docs/Web/API/MediaSource -- (without modifications) in hopes of transforming the blobs into arraybuffers and appending those to a sourcebuffer for the MediaSource WebAPI, but even the sample code wasn't working on my chrome browser for which it is said to be compatible. The crux of my problem is that I can't combine multiple blob webm clips into one without incorrect playback after the first time it plays. To go straight to the problem

Javascript make audio blob

我怕爱的太早我们不能终老 提交于 2019-11-28 22:06:25
I am testing the html audio tag and I would like to make audio blob url's , like youtube or vimeo does, and add it to the "src" to start playing the audio. I've been testing with new Blob() and URL.createObjectURL() but I don't know how to use it. I would like to do something like: <audio controls src"blob:null/8142a612-29ad-4220-af08-9a31c55ed078"></audio> I would greatly appreciate your help. Suppose you have base64 encoded version of audio like this data="data:audio/ogg;base64,T2dnUwACAAAAAAAAAADSeWyXAU9nZ1MAAAAAAAAAAAAA0nl"; 1.First remove the base64 headers (preamble) and decode it to

彻底删除git中的较大文件(包括历史提交记录)

回眸只為那壹抹淺笑 提交于 2019-11-28 21:51:37
2019年04月15日 15:47:31 HappyRocking 阅读数 395 更多 分类专栏: linux 版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。 本文链接: https://blog.csdn.net/HappyRocking/article/details/89313501 场景 适用于从一个git项目中,将体积较大的资源彻底从git中删除,包括历史提交记录。 如果仅仅在目录中删除一个文件是不够的,只要在提交记录中有这个文件,那么 .git 中就会有这个文件的信息。 用 filter-branch 可以强制修改提交信息,将某个文件的历史提交痕迹也抹去,就像从来没有过这个文件一样。 做法 0、确保本地仓库是最新版本。 1、在项目根目录下运行 git rev-list --all | xargs -rL1 git ls-tree -r --long | sort -uk3 | sort -rnk4 | head -10 列出所有仓库中的对象(包括SHA值、大小、路径等),并按照大小降序排列,列出TOP 10。 $ git rev-list --all | xargs -rL1 git ls-tree -r --long | sort -uk3 | sort -rnk4 | head -10 100644

blob格式导出文件

本小妞迷上赌 提交于 2019-11-28 21:49:47
最近在做blob流导出相关功能,其中需要导出excel、csv、word、zip压缩文件之类的,在导出excel和word中需要知道对应的content-type属性,正好看到下面这篇文章,感觉挺好的就记录一下 后缀 MIME Type .doc application/msword .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document .xls application/vnd.ms-excel .xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .ppt application/vnd.ms-powerpoint .pptx application/vnd.openxmlformats-officedocument.presentationml.presentation 附带导出excel文件格式的相关js代码 exportFile(data:any, fileName:string) { let blob = new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml

Inserting Image Into BLOB Oracle 10g

北城余情 提交于 2019-11-28 21:36:09
I am trying to insert an image into an BLOB field in a signatures which i will then select from the table and render on a report. I cannot seem to figure how to get the image into the table. I did an insert however when i render only the path to the image was shown on the report and not the image itself. Table CREATE TABLE esignatures ( office NUMBER(6,0) NOT NULL, username VARCHAR2(10) NOT NULL, iblob BLOB NOT NULL ) INSERT Statement (SQL) INSERT INTO esignatures VALUES (100, 'BOB', utl_raw.cast_to_raw('C:\pictures\image1.png')); I know for sure i am inserting the String location in the form

Retrieve nsdata from sqlite stored in Blob data type for iPhone App

≯℡__Kan透↙ 提交于 2019-11-28 20:58:53
In iPhone App how to store UIImage converted into NSData to sqlite table in BLOB datatype? Is there any kind of binding needed( NSData ->Blob)? or While retrieving image stored in NSData form in sqlite Blob datatype, should I need to perform any task to convert that stored database in blob datatype to get back into NSData form? Please help and suggest. I used something like this: // prepare sqlite3 statement before this line int res = sqlite3_step(stmt); if (res == SQLITE_ROW) { const void *ptr = sqlite3_column_blob(stmt, 0); int size = sqlite3_column_bytes(stmt, 0); data = [[NSData alloc]