Too much overlap in storage plugin URLs for meaningful loadbalancing and config simplicity. Make poorxy emulate the real situation and change related URLs.

This commit is contained in:
Simo Kinnunen
2015-01-07 14:04:36 +09:00
parent 7c16c40dae
commit 8b9e5d58c9
8 changed files with 70 additions and 57 deletions

View File

@@ -5,7 +5,7 @@ module.exports = function StorageServiceFactory($http, $upload) {
service.storeUrl = function(type, url) {
return $http({
url: '/s/api/v1/' + type + '/download'
url: '/s/download/' + type
, method: 'POST'
, data: {
url: url
@@ -19,7 +19,7 @@ module.exports = function StorageServiceFactory($http, $upload) {
if (input.length) {
$upload.upload({
url: '/s/api/v1/' + type
url: '/s/upload/' + type
, method: 'POST'
, file: input
})