Socket
Socket
Sign inDemoInstall

yu-img-upload

Package Overview
Dependencies
4
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yu-img-upload

a simple images upload plugin with preview


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

##Introduce

this script is just for image upload,it support pc ios and android. in pc & ios you can clear what you picked and repick the pictures;in android you should pick and delete the picture only one by one.

##Quick to start:

install:
npm install --save yu-img-upload

import:
import YuImgUpload from 'yu-img-upload'

##Example

You can use npm run dev to check the example file in node package

new imgUpload({
        popup:true,
        multiple:true,
        name:'file',
        target:document.querySelector('.imgUpload'),
        maxnum:6,
        maxsize:0.5,
        accept:'image/gif,image/jpeg,image/jpg,image/png,image/svg',
        hint:'icon',
    });
    

##参数

  • @param {object[]} option
  • @param {boolean} [option[].popup = true] - should it use yu-popup or alert
  • @param {boolean} [option[].multiple = true] - should it accept multiple files
  • @param {string} [option[].name = file] - the name of input
  • @param {obejct} [option[].target = document.querySelector('.imgUpload')] - which dom to render
  • @param {number} [option[].maxnum = 9] - the max number of pictures that can be upload
  • @param {number} [option[].maxsize = 1] - the max size of eeach picture
  • @param {string} [option[].accept = image/gif,image/jpeg,image/jpg,image/png,image/svg] - the format of picture that can be accepted
  • @param {string} [option[].hint = icon] - how button shows

##Links #####github
see https://github.com/watanabeyu0709/yu-img-upload #####npm
see https://www.npmjs.com/package/yu-img-upload

Keywords

FAQs

Last updated on 10 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc