Code Explainers

Code explainers tagged #file-serving

python
from pathlib import Path
 
from django.contrib.auth.decorators import login_required
from django.http import FileResponse, Http404, HttpResponseForbidden

Serving files with access checks in Django

authorization http-caching file-serving
Intermediate 7 steps
go
package storage
 
import (
	"bufio"

Streaming file downloads safely in Go

http streaming path-traversal
Intermediate 7 steps
rust
use axum::{
    body::Body,
    extract::Path,
    http::{header, StatusCode},

Streaming file downloads in Axum

streaming file-serving path-traversal
Intermediate 8 steps