所以我基本上试图保存一个使用jQuery的mp3文件。第一个问题是保存的blob的大小几乎是下载大小的2倍。另一个问题是下载的文件未被识别为音频文件。在将浏览器添加为音频源时,浏览器都没有桌面音频播放器。
这是我用来获取和保存数据的位。
Blob {size: 13821949, type: "audio/mp3"}
我做的那个blob:
HTTP/1.1 200 OK
Date: Tue, 10 Jan 2017 18:43:42 GMT
Server: Apache
X-Powered-By: PHP/5.3.3
Cache-Control: public, must-revalidate, max-age=0
Pragma: no-cache
Content-Length: 7832555
Content-Disposition: inline; filename=5b6wgswib0.mp3
Content-Transfer-Encoding: binary
Last-Modified: Tue, 05 May 2015 08:58:26 +0300
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: audio/mpeg
这些也是我下载的同一网址的响应标题。
var startDate = new Date("January 13, 2017 00:00:00");
var endDate = new Date ("January 26, 2017 23:59:59");
var startDateInMilliSeconds = startDate.getTime();
startDate = startDateInMilliSeconds + 86400000 * 14;
date = startDate.toUTCString();
Logger.log(date);