mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-16 21:15:21 +00:00
20 lines
617 B
JavaScript
Executable File
20 lines
617 B
JavaScript
Executable File
'use strict';
|
|
|
|
angular.module('dssWebApp')
|
|
.service('ImageUploadService', function ($upload, logger, SERVER_CONFIG) {
|
|
return {
|
|
uploadMixImage: function (hash, image, success) {
|
|
$upload.upload({
|
|
url: SERVER_CONFIG.apiUrl + '/_image/',
|
|
data: hash,
|
|
file: image
|
|
}).success(function (data, status, headers, config) {
|
|
success(data);
|
|
}).error(function (reason) {
|
|
logger.logError(reason, arguments);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
);
|