This PR fixes the issue of the evergrowing state url parameter for chunked uploads, on very large layers state jwt could exceed 16k limit for worker URL resulting in failed uploads.
This fix replaces state with stateHash to make sure the upload state is consistently in order across chunk sequence (relying on the docker spec requirement of chunk uploads being sequential)
Thanks this is very good! Really wanted to get this state thing done as we started off with a simple jwt but then we just moved to keeping state in r2. If you can run the linter over this I'd appreciate it.
This PR fixes the issue of the evergrowing state url parameter for chunked uploads, on very large layers state jwt could exceed 16k limit for worker URL resulting in failed uploads. This fix replaces state with stateHash to make sure the upload state is consistently in order across chunk sequence (relying on the docker spec requirement of chunk uploads being sequential)