Browse Source

Added subdir for FxOS

Closes #798
master
Igor Zhukov 9 years ago
parent
commit
30c04d3b89
  1. 3
      app/js/lib/ng_utils.js

3
app/js/lib/ng_utils.js

@ -258,6 +258,7 @@ angular.module('izhukov.utils', []) @@ -258,6 +258,7 @@ angular.module('izhukov.utils', [])
if (window.navigator && navigator.getDeviceStorage) {
var storageName = 'sdcard';
var subdir = 'telegram/';
switch (mimeType.split('/')[0]) {
case 'video': storageName = 'videos'; break;
case 'audio': storageName = 'music'; break;
@ -265,7 +266,7 @@ angular.module('izhukov.utils', []) @@ -265,7 +266,7 @@ angular.module('izhukov.utils', [])
}
var deviceStorage = navigator.getDeviceStorage(storageName);
var request = deviceStorage.addNamed(blob, fileName);
var request = deviceStorage.addNamed(blob, subdir + fileName);
request.onsuccess = function () {
console.log('Device storage save result', this.result);

Loading…
Cancel
Save