展示HN:Pushduck – 基于Cloudflare Workers的S3上传,无需AWS SDK
我在为多个项目设置文件上传时,发现使用庞大的 aws-sdk 让我感到疲惫,因此我自己构建了一个解决方案。我的第一次尝试是 next-s3-uploader,虽然它能工作,但开发者体验需要大幅提升,我希望能够充分利用类型安全的 TypeScript,并且想要一个非常轻量的工具包,能够满足开发者管理 S3 的所有需求。
特别感谢 `aws4fetch`,使得这个工具能够在边缘环境和 Cloudflare Workers 中运行。现在我正在尝试扩展并支持非 React.js 框架。
设置文件上传不应该很难,但实际上却很复杂。更简单的选项往往会有供应商锁定的问题。
因此,我制作了一个开发体验友好、类型安全的文件上传库,希望你喜欢。如果有任何改进建议或选项,欢迎讨论。
查看原文
I was tired setting up file uploads for multiple projects with bloated aws-sdk so built my own, my first attempt was next-s3-uploader, it worked but needed much better developer experience and wanted to get all benifits of typesafe Typescript, and wanted to have a very light weight toolkit that can do all things a dev needs to manage s3.<p>Credits to `aws4fetch` which made it be able to run in edge enviornments and cloudflare workers, now im trying to expand and build towards non Reactjs frameworks too and have support.<p>Setting up file uploads shouldnt be hard, but is. the easier options have vendor lockin's.<p>So made a DX friendly, typesafe file upload library, enjoy. Happy to discuss any improvements and options.