Coder Social home page Coder Social logo

assets's Introduction

Client & Server

Araden 的静态资源站

技术栈:Vue.js + NestJS + TypeScript

已预置:Github Action Workflow

上传说明

上传时请求为 POST 格式,携带请求头 upload-assets-key,该请求头的组成为:

  • .env.local 文件中的 key
  • 当前日期的 toLocaleString 格式

上述组成部分拼接后经 md5 哈希得到

Util

基于 NodeJS 的资源上传脚本,后端为 assets-be

本脚本主要应用场景为 Typora 的粘贴图片时的上传操作

食用方法

  1. 新建 .env.local 文件,内容为
# 请把等号后面的所有文字替换成实际使用时的值,行尾序列选择 LF
key=<value> # value 为后端定义的文件上传时的密钥
domain=<value> # value 为后端服务运行地址
  1. pnpm i
  2. [pnpm dlx] ts-node ./upload.ts <file-path>
  3. 脚本输出资源上传后的可供访问的 URL

assets's People

Contributors

godaraden avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.