SShortSingh.
Back to feed

How to Build Resumable Video Uploads Using tus Protocol, Node.js, and tus-js-client

0
·1 views

The tus protocol enables resumable HTTP-based file uploads, solving the problem of lost progress when a network connection drops mid-transfer. A developer tutorial demonstrates how to set up a Node.js server using the @tus/server and @tus/file-store packages to accept and store large video uploads. On the client side, tus-js-client is configured in the browser with automatic retry delays to seamlessly resume interrupted uploads from the exact byte offset. The protocol relies on three HTTP requests — POST to create an upload, PATCH to send chunks, and HEAD to query the current offset before resuming. The guide also covers adding basic validation hooks, such as restricting uploads to video file types and enforcing a 5 GB size cap.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Top AI companies score poorly on their own AI-agent website readiness scan

A readiness scan of 19 major AI-native companies — including OpenAI, Anthropic, Stripe, and GitHub — found that none earned an A grade for AI-agent compatibility, with an average pass rate of just 54.5% across 34 technical signals. The audit was conducted by AgentFix, a commercial AI-readiness scanner, which tested each site via live HTTP requests rather than static code analysis. Common failures included missing FAQPage and BreadcrumbList JSON-LD schema, absent agent protocol cards, and lack of markdown content negotiation — gaps that reduce how effectively AI tools like ChatGPT and Perplexity surface a site's content. The irony noted by the team is that these are the very companies whose AI bots crawl the broader web, yet their own sites fall short of the standards that aid such crawling. AgentFix plans to re-run the same benchmark in October 2025 to track whether these companies have improved their scores.

0
ProgrammingDEV Community ·

Codename One Launches Privacy-First Analytics API With Consent Gate and Multi-Provider Support

Codename One, an open-source framework for building cross-platform apps in Java or Kotlin, has introduced a redesigned analytics API that replaces its outdated Google Analytics v1 integration. The new system separates three previously tangled concerns — what is reported, where it is sent, and whether sending is permitted — through a facade, a provider interface, and a consent gate. Reporting is opt-in by default, meaning no data reaches any analytics provider until the user explicitly grants consent, addressing GDPR and CCPA compliance requirements. Consent is granular, allowing users to permit crash reporting while declining behavioral analytics, and a pseudonymous client ID stored in app preferences can be reset on erasure requests. Five analytics providers ship with the package, including integrations for Google Analytics 4 and Matomo, alongside Codename One's own cloud-based provider available to paid subscribers.

0
ProgrammingDEV Community ·

Google ADK: Open-Source Framework Aims to Bridge Gap Between AI Agent Demos and Production

Google's Agent Development Kit (ADK) is an open-source framework designed to help developers build, evaluate, and deploy production-grade AI agents — the same toolkit Google uses internally for products like Agentspace. Unlike basic prompt-in-a-loop implementations, ADK provides structured building blocks: Agents, Tools, a Runner, and Sessions, enabling planning, tool execution, error recovery, and persistent state. The framework is model-agnostic, supporting Gemini primarily but also other models, and can run locally, on Cloud Run, or within Gemini Enterprise. A key feature is its built-in developer UI, which provides live traces of every tool call and model reasoning step without requiring any frontend code. ADK positions itself as a more robust alternative to frameworks like LangGraph and CrewAI by treating typed Python functions as first-class tools and auto-generating callable schemas from function signatures and docstrings.

How to Build Resumable Video Uploads Using tus Protocol, Node.js, and tus-js-client · ShortSingh