← All Learning Paths

File Processing Engineer

Move files without moving memory: streaming multipart uploads, checksums, size limits, path traversal defense, and the maxBuffer errors that crash naive pipelines.

roleintermediate9 nodes14.33h total

Path overview

文件处理的工程本质是让字节流过系统,而不是驻留内存。本路径从上传校验与路径穿越防御的安全边界讲起,经 Go、Fastify、Busboy、Python 四种流式实现,收尾于请求体限制配置与文件去重完整项目。

File processing is engineering bytes to flow through the system, not live in memory. This path covers upload validation, path traversal defense, streaming implementations in four stacks, body limits, and a deduplicator project.

  1. Read "Designing File Upload Systems for Scale" for the "Never Buffer the Whole File in Memory" argument, then name the decision in files work it would change.

    Completion criteria: Write a five-line decision note citing "Never Buffer the Whole File in Memory" from "Designing File Upload Systems for Scale", name the option you rejected, and attach the before/after diff of one file you changed.

    Next step: How to Secure File Uploads in a Web API

    ⏱ 1h

  2. Compare "Validate the upload at every layer" with "Enforce size and stream limits" in "How to Secure File Uploads in a Web API" and state which trade-off you would accept in files code.

    Prerequisites: Designing File Upload Systems for Scale

    Completion criteria: Attach a one-page summary that quotes "Validate the upload at every layer", lists two trade-offs, and links the commit where you applied it.

    Next step: Multipart Streaming File Upload Handler

    ⏱ 1h

  3. Execute "Multipart Streaming File Upload Handler", change one constant, and describe how the output diverges from "Stream multipart uploads in a Go handler with a memory threshold, per-file size caps, and".

    Prerequisites: How to Secure File Uploads in a Web API

    Completion criteria: Attach the terminal transcript for "Multipart Streaming File Upload Handler": command, exit code, and the printed result you used to confirm "Stream multipart uploads in a Go handler with a memory threshold, per-file size caps, and".

    Next step: Fastify Multipart Streaming File Upload

    ⏱ 0.75h

  4. Run the files snippet "Fastify Multipart Streaming File Upload", capture stdout, and show which line demonstrates the documented behavior: "Accept streaming multipart uploads in Fastify with per-file size limits, MIME allowlists,".

    Prerequisites: Multipart Streaming File Upload Handler

    Completion criteria: Change one constant in "Fastify Multipart Streaming File Upload", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Busboy Streaming Multipart Limits

    ⏱ 0.75h

  5. Adapt "Busboy Streaming Multipart Limits" to a second input and compare the new output with the behavior described in "Parse multipart request bodies with Busboy in streaming mode, enforcing file count, size,".

    Prerequisites: Fastify Multipart Streaming File Upload

    Completion criteria: Paste the command, the exit code, and the output line matching "Parse multipart request bodies with Busboy in streaming mode, enforcing file count, size,"; then show a second run with a changed parameter.

    Next step: Streaming File Checksums With SHA-256

    ⏱ 0.75h

  6. Execute "Streaming File Checksums With SHA-256", change one constant, and describe how the output diverges from "Compute file checksums in fixed-size chunks, support alternate hashlib algorithms, and".

    Prerequisites: Busboy Streaming Multipart Limits

    Completion criteria: Save two runs of "Streaming File Checksums With SHA-256" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Enforce a Request Body Size Limit

    ⏱ 0.75h

  7. Run "Reject oversized request bodies before they are buffered, and return a stable 413 response" from "Enforce a Request Body Size Limit" and confirm the documented result "JSON routes accept bodies up to 100 KB and uploads up to 5 MB; neither parser is unbounded.".

    Prerequisites: Streaming File Checksums With SHA-256

    Completion criteria: Run "Enforce a Request Body Size Limit" twice — once as written and once with a changed input — and attach both transcripts with the observed difference.

    Next step: Reject Uploads That Violate Policy

    ⏱ 0.5h

  8. Solve "Reject Uploads That Violate Policy" for files work: turn JSON object: { file: { name, sizeBytes, mime }, policy: { maxBytes, into [extension-not-allowed,mime-not-allowed,too-large] and pass both samples.

    Completion criteria: Submit a solution for "File Processing Engineer" that passes both samples ({file:{name:avatar.exe,sizeBytes:2048,mime:text/html},policy to [extension-not-allowed,mime-not-allowed,too-large]) and attach the failing case you fixed.

    Next step: Build a Content-Addressed File Deduplicator

    ⏱ 0.33h

  9. Deliver the "Build a Content-Addressed File Deduplicator" blueprint with "Three-stage comparison: size, first-and-last 4KB hash, full SHA-256, so large trees scan" working and "A dry-run report listing duplicate groups, member paths, and reclaimable bytes" recorded as evidence.

    Prerequisites: Reject Uploads That Violate Policy

    Completion criteria: Ship "Three-stage comparison: size, first-and-last 4KB hash, full SHA-256, so large trees scan" and attach the test log plus a one-page acceptance note mapping the feature to the passing test.

    Next step: Apply this path in a capstone project and review the related resources.

    ⏱ 6h