| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | (function () { |
||
| 32 | $scope.downloadFile = function (credential, file) { |
||
| 33 | ShareService.downloadSharedFile(credential, file).then(function (result) { |
||
| 34 | if (!result.hasOwnProperty('file_data')) { |
||
| 35 | NotificationService.showNotification('Error downloading file, you probably don\'t have enough permissions', 5000); |
||
| 36 | return; |
||
| 37 | } |
||
| 38 | var file_data = EncryptService.decryptString(result.file_data, _key); |
||
| 39 | download(file_data, escapeHTML(file.filename), file.mimetype); |
||
| 40 | }); |
||
| 41 | }; |
||
| 42 | }]); |
||
| 44 |