nuts icon indicating copy to clipboard operation
nuts copied to clipboard

Is there support for differential downloads?

Open aniketbiprojit opened this issue 5 years ago • 1 comments

The thing is I have an app which has binaries over 700MB. Can't ask user to update that much data everytime.

Cannot download differentially, fallback to full download: Error: Content-Type "multipart/byteranges" is expected, but got "application/octet-stream"

This is what I am using:

require('dotenv').config()
const express = require('express')
const { init, get_latest_yml, get_latest_blockmaps } = require('./api')
const Nuts = require('nuts-serve').Nuts

const app = express()

app.use(express.json())

const nuts = Nuts({
	repository: 'aftershootco/AfterShoot-Electron',
	token: process.env.GH_TOKEN,
})

app.get('/myapp/download/win/AfterShoot-win-*.exe', (req, res) => {
	res.redirect('/myapp/download/win/')
})

app.get('/myapp/download/mac/AfterShoot-mac-*.dmg', (req, res) => {
	res.redirect('/myapp/download/mac/')
})

app.use(
	'/myapp',
	(req, res, next) => {
		console.log(req.url)
		next()
	},
	nuts.router
)
app.listen(80)

Or is this happening due to redirect?

aniketbiprojit avatar Sep 22 '20 20:09 aniketbiprojit

Nuts doesn't support differential downloads, unless you're using nuget/nupkg and generating deltas. differential downloads are typically package format specific. nuts is just a release server... You can check out my fork if you're looking for something currently maintained, https://github.com/dopry/pecans I'm also on the look out for additional maintainers.

dopry avatar Jun 27 '23 02:06 dopry