file-upload-object-storage

Generate presigned POST policies for secure object storage uploads.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill file-upload-object-storage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-upload-object-storage
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/file-upload-object-storage
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill file-upload-object-storage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the security and performance risks associated with handling file uploads, such as server memory exhaustion, path traversal, and malicious file execution.

Core Features & Use Cases

  • Direct-to-Bucket Uploads: Offloads traffic from your server by generating short-lived presigned URLs for client-side uploads.
  • Robust Validation: Enforces strict size limits and performs server-side magic-byte verification to prevent file type spoofing.
  • Lifecycle Management: Automates the cleanup of orphaned multipart uploads and temporary files to optimize storage costs.

Quick Start

Use the file-upload-object-storage skill to generate a secure presigned POST policy for a user avatar upload with a 5MB size limit.

Frequently Asked Questions about file-upload-object-storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate presigned URLs for direct-to-bucket file uploads to S3?

To generate presigned URLs for S3 file uploads, you create short-lived presigned POST policies that offload upload traffic directly from your server to the object storage bucket. This allows clients to upload files securely without exposing permanent credentials.

How does magic byte verification prevent malicious file execution during object storage uploads?

Magic byte verification prevents malicious file execution by inspecting the raw binary signatures of uploaded files server-side. This strict validation detects file type spoofing, ensuring that MIME types match the actual file content rather than trusting client-provided headers.

What is the best way to handle multipart uploads to cloud storage for large files?

The best way to handle multipart uploads for large files is using presigned credentials to transfer file chunks directly to object storage. This approach prevents server memory exhaustion and includes automated lifecycle cleanup for orphaned or incomplete multipart objects.

Can I enforce tenant-scoped access control and size ceilings for S3 uploads?

Yes, you can enforce tenant-scoped access control and size ceilings by using non-guessable key namespacing and strict size limits within the presigned POST policy. This ensures private-by-default access control and prevents unauthorized cross-tenant file uploads.

Why do orphaned multipart uploads accumulate in cloud storage and how do I automate cleanup?

Orphaned multipart uploads accumulate when large file transfers are interrupted or abandoned. You automate cleanup by implementing lifecycle management rules that identify and delete incomplete multipart objects, optimizing storage costs and removing orphaned temporary files.