Implement APK uploads using the new storage system. Installation from URL still does not work, and dropping the file on the screen may not work either.

This commit is contained in:
Simo Kinnunen
2014-05-22 13:33:38 +09:00
parent 1db48e9fcb
commit 41ed33f5c4
17 changed files with 389 additions and 336 deletions

View File

@@ -73,13 +73,21 @@ module.exports = function(options) {
, authUrl: options.authUrl
}))
// Proxied requests must come before any body parsers
// Proxied requests must come before any body parsers. These proxies are
// here mainly for convenience, they should be replaced with proper reverse
// proxies in production.
app.all('/api/v1/s/image/*', function(req, res) {
proxy.web(req, res, {
target: options.storagePluginImageUrl
})
})
app.all('/api/v1/s/apk/*', function(req, res) {
proxy.web(req, res, {
target: options.storagePluginApkUrl
})
})
app.all('/api/v1/s/*', function(req, res) {
proxy.web(req, res, {
target: options.storageUrl
@@ -507,7 +515,11 @@ module.exports = function(options) {
channel
, wireutil.transaction(
responseChannel
, new wire.InstallMessage(data)
, new wire.InstallMessage(
data.href
, data.launch === true
, JSON.stringify(data.manifest)
)
)
])
})