Code Monkey home page Code Monkey logo

image-server's Introduction

Image-server

  /*
    上传的图片会默认转换成同名的webp格式图片文件,返回结果会按照上传格式返回,可以直接在前端请求webp格式的图片
    http://127.0.0.1/photo/7891693689182.jpg   'ok'
    http://127.0.0.1/photo/7891693689182.webp  'ok'
  */

接口说明

  • 将图片上传至接口,成功会返回在线的图片链接提供使用

    请求地址:/photo/:children1?/:children2?
    请求类型:post
    类型:file
    说明::'children1?/:children2?' 为可选,代表图片在photo目录下的哪个文件夹,最多2级目录
    
    请求参数:无
    响应参数:
    { 
    	code: 200, 
    	msg: "上传成功", 
    	data: [
            'http://127.0.0.1/photo/7891693689182.jpg'
    	]
     }
  • 以base64的方式将图片上传至接口,成功会返回在线的图片链接提供使用

    请求地址:/blog/:children1?/:children2?
    请求类型:post
    说明::'children1?/:children2?' 为可选,代表图片在目录下的哪个文件夹,最多2级目录
    
    请求参数:
    {
      imagData:'base64'
    }
    响应参数:
    { 
    	code: 200, 
    	msg: "上传成功", 
    	data: [
            'http://127.0.0.1/photo/7891693689182.jpg'
    	]
     }

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.