muxinc / upchunk

Uploads Chunks! Takes big files, splits them up, then uploads each one with care (and PUT requests).
MIT License
345 stars 46 forks source link

Fail sooner if the endpoint function doesn't return a string #8

Open mmcc opened 5 years ago

mmcc commented 5 years ago

Currently if someone passes a fetching function as the endpoint option and that function fails to return a URL, UpChunk will merrily continue on and try to upload. We should fail faster with a helpful error message.

aminamos commented 2 years ago

@mmcc is this still an issue? Would this line catch it? https://github.com/muxinc/upchunk/blob/638eb154683fb7beb1f63a5187eafe76ddaba529/src/upchunk.ts#L140