All Projects → adispartadev → spartan-multi-image-picker

adispartadev / spartan-multi-image-picker

Licence: Apache-2.0 license
A Jquery multi image picker with preview (and madness)

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to spartan-multi-image-picker

Imagepicker
Super Image Picker is a powerful image selector. Support for huge image preview (such as 10000 * 5000px), support for image cropping, configurable avatar mode and normal mode, support for a variety of image load library
Stars: ✭ 891 (+5840%)
Mutual labels:  imagepicker
Imageselector
🌁 Android 图片选择器。充分自由定制,极大程度简化使用,支持图库多选/图片预览/单选/照片裁剪/拍照/自定义图片加载方式/自定义色调/沉浸式状态栏
Stars: ✭ 1,310 (+8633.33%)
Mutual labels:  imagepicker
Matisse
基于知乎Matisse增强,一行代码实现图片/视频选择,裁剪,微信同款视频录制和拍照,无需权限申请!
Stars: ✭ 174 (+1060%)
Mutual labels:  imagepicker
Yimagepicker
小红书多图剪裁+微信图片选择器+大图预览+图片剪裁(支持圆形剪裁和镂空剪裁),已适配androidQ,借鉴并升级matisse加载内核!超强定制性可轻松实现知乎/马蜂窝/微博等特殊样式!支持跨进程回调!内部结构轻量级,无任何第三方开源库!支持support依赖!
Stars: ✭ 975 (+6400%)
Mutual labels:  imagepicker
Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (+360%)
Mutual labels:  imagepicker
Ritlimagepickerdemo
一个基于Photos.framework的图片多选,模仿微信,还有很多不足,正在改进和优化
Stars: ✭ 124 (+726.67%)
Mutual labels:  imagepicker
Imagepicker
📷 Reinventing the way ImagePicker works.
Stars: ✭ 4,634 (+30793.33%)
Mutual labels:  imagepicker
nativescript-imagepicker
Imagepicker plugin supporting both single and multiple selection.
Stars: ✭ 103 (+586.67%)
Mutual labels:  imagepicker
Rximagepicker
Android图片相册预览选择器、支持AndroidX,支持图片的单选、多选、图片预览、图片文件夹切换、在选择图片时调用相机拍照
Stars: ✭ 85 (+466.67%)
Mutual labels:  imagepicker
Opalimagepicker
A multiple image picker for iOS, written in Swift
Stars: ✭ 165 (+1000%)
Mutual labels:  imagepicker
Pgimagepicker
类似于微博、微信的多图浏览/查看
Stars: ✭ 39 (+160%)
Mutual labels:  imagepicker
Rximagepicker
🚀RxJava2 and RxJava3 external support. Android flexible picture selector, provides the support for theme of Zhihu and WeChat (灵活的Android图片选择器,提供了知乎和微信主题的支持).
Stars: ✭ 1,098 (+7220%)
Mutual labels:  imagepicker
Cordova Plugin Mediapicker
cordova android ios mediaPicker support selection of multiple image and video gif ✨ cordova android 和 ios 图片视频选择cordova插件,支持多图 视频 gif,ui类似微信
Stars: ✭ 136 (+806.67%)
Mutual labels:  imagepicker
Lpalbum
an albums that can preview, multiple-choice
Stars: ✭ 17 (+13.33%)
Mutual labels:  imagepicker
Zyimagepickerandbrower
2018iOS微信相册,朋友圈imagePicker UI仿,微信照片选择器 多选序号
Stars: ✭ 210 (+1300%)
Mutual labels:  imagepicker
Imagepicker
📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Stars: ✭ 623 (+4053.33%)
Mutual labels:  imagepicker
Gallery
📹 Your next favorite image and video picker
Stars: ✭ 1,320 (+8700%)
Mutual labels:  imagepicker
RAImagePicker
📸 iMessage-like, Image Picker Controller Provides custom features.
Stars: ✭ 14 (-6.67%)
Mutual labels:  imagepicker
SSImagePicker
Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... 📸
Stars: ✭ 227 (+1413.33%)
Mutual labels:  imagepicker
Awesomeimagepicker
Awesome Image Picker library will pick images/gifs with beautiful interface. Supports image or gif, Single and Multiple Image selection.
Stars: ✭ 160 (+966.67%)
Mutual labels:  imagepicker

spartan-multi-image-picker

A Jquery multi image picker with preview (and madness).

npm

Version

Hello, sorry for not doing maintenance for a long time. I upgraded a few things but nothing much has changed. I hope this plugin can still run properly.

This plugin enable you to upload multiple files on a html form without hold Ctrl on your keyboard. You can use it for non-ajax or ajax uploading file.

img

Current New Feature

  1. Drag and drop image

  2. Direct image uploading

Installation

Download this package or install via bower

bower install spartan-multi-image-picker

Include stylesheet, I recommended to use bootstrap.

<link  href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"  rel="stylesheet"  integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor"  crossorigin="anonymous">
<script  src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"  integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2"  crossorigin="anonymous"></script>

Include requirement script and this plugin after that like so.

<script  type="text/javascript"  src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script  type="text/javascript"  src="dist/js/spartan-multi-image-picker-min.js"></script>

Create an element where do you want to activate this input file.

	<div  id="image_picker" class="row"></div>

Activate this plugin.

$("#image_picker").spartanMultiImagePicker({
	fieldName:  'fileUpload[]' // this configuration will send your images named "fileUpload" to the server
});

The fieldName is your field name that will appended as input type file to you html.

All Properties

This is what you can custom when you call this plugin.

Property Type Example
fieldName String fileUpload[] or fileUpload for single image
maxCount Number 1, 2 remove for unlimited count
rowHeight String 200px
groupClassName String col-md-4 col-sm-4 col-xs-6
allowedExt String png|jpg|jpeg|gif or empty string for all type
placeholderImage Object with image and width properties { image: 'placeholder.png', width: '100%'}
maxFileSize Number (in kb) 40000
dropFileLabel String Drop file here
directUpload Object See in my example file

Callback

Callback Description Return Param
onAddRow Called on a new field appear item count
onRenderedPreview Called on image rendered as a preview item count
onRemoveRow Called on user click the remove button for each field item count
onExtensionErr Called on extension didn't match as allowedExtension item count, file
onSizeErr Called on image size is more than maxFileSize prop item count, file

Customize example:

$("#multi_image_picker").spartanMultiImagePicker({
		fieldName     : 'fileUpload[]', // this configuration will send your images named "fileUpload" to the server
		maxCount      : 5,
		rowHeight     : '200px',
		groupClassName: 'col-4',
		maxFileSize   : '',
		dropFileLabel : "Drop Here",
		onAddRow      : function(index){
			console.log(index);
			console.log('add new row');
		},
		onRenderedPreview : function(index){
			console.log(index);
			console.log('preview rendered');
		},
		onRemoveRow : function(index){
			console.log(index);
		},
		onExtensionErr : function(index, file){
			console.log(index, file,  'extension err');
			alert('Please only input png or jpg type file')
		},
		onSizeErr : function(index, file){
			console.log(index, file,  'file size too big');
			alert('File size too big');
		}
	}
);

Direct Upload Image

Is this option is true, your file is directly send to serve when file selected. This is a few example code

$("#multi_image_picker").spartanMultiImagePicker({
	fieldName     : 'fileUpload[]', // this configuration will send your images named "fileUpload" to the server
	directUpload : {
		status: true,
		loaderIcon: `<div class="spinner-border text-primary"></div>`, // spinner class from bootstrap
		url: 'action.php',
		additionalParam : {
			name : 'My Name'
		},
		success : function(data, textStatus, jqXHR){

		},
		error : function(jqXHR, textStatus, errorThrown){

		}
	}
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].