1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixed ie10 image uploading

This commit is contained in:
Luke Pulverenti 2013-05-16 22:32:23 -04:00
parent 73c8898800
commit 9bcadf03cd
2 changed files with 7 additions and 5 deletions

View file

@ -922,7 +922,8 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
// Closure to capture the file information.
reader.onload = function (e) {
var data = window.btoa(e.target.result);
// Split by a comma to remove the url: prefix
var data = e.target.result.split(',')[1];
var url = self.getUrl("Users/" + userId + "/Images/" + imageType);
@ -941,7 +942,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
// Read in the image file as a data URL.
reader.readAsBinaryString(file);
reader.readAsDataURL(file);
return deferred.promise();
};
@ -979,7 +980,8 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
// Closure to capture the file information.
reader.onload = function (e) {
var data = window.btoa(e.target.result);
// Split by a comma to remove the url: prefix
var data = e.target.result.split(',')[1];
var url = self.getUrl("Items/" + itemId + "/Images/" + imageType);
@ -998,7 +1000,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
// Read in the image file as a data URL.
reader.readAsBinaryString(file);
reader.readAsDataURL(file);
return deferred.promise();
};

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.114" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.115" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.45" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.45" targetFramework="net45" />
</packages>