All Projects → egonolieux → Bootstrap Imageupload

egonolieux / Bootstrap Imageupload

Licence: mit
A Bootstrap/jQuery plugin to preview image uploads.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bootstrap Imageupload

Spring Web Rss Channels
A Full Stack RSS Reader web application built with Spring MVC and JSP. It uses libraries like Spring, JPA, Bootstrap, Apache Tiles, JSP etc. There is also a static code analysis tool called Checkstyle.
Stars: ✭ 40 (-18.37%)
Mutual labels:  bootstrap
Vue2 Admin Lte
📊 adminLTE to vuejs v2.x converting project
Stars: ✭ 1,023 (+1987.76%)
Mutual labels:  bootstrap
Go Astilectron Bootstrap
Create a one-window application using Astilectron
Stars: ✭ 46 (-6.12%)
Mutual labels:  bootstrap
Bootstrap Navbar
Helpers to generate a Twitter Bootstrap navbar
Stars: ✭ 40 (-18.37%)
Mutual labels:  bootstrap
Resample
Randomization-based inference in Python
Stars: ✭ 44 (-10.2%)
Mutual labels:  bootstrap
Nodejs Socketio Chat App
MEAN Stack & Socket.IO Real-time Chat App | A MEAN stack based Real Time chat application
Stars: ✭ 45 (-8.16%)
Mutual labels:  bootstrap
Gramophone
WordPress, Bootstrap 4 & <3
Stars: ✭ 39 (-20.41%)
Mutual labels:  bootstrap
Yii2 Widget Rating
A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)
Stars: ✭ 47 (-4.08%)
Mutual labels:  bootstrap
Bootstrap4layouts
A Template for Bootstrap 4 based on my Bootstrap 4 Layouts course on LinkedIn Learning
Stars: ✭ 44 (-10.2%)
Mutual labels:  bootstrap
Vuedarkmode
👩‍🎨👨‍🎨 A minimalist dark design system for Vue.js. Based components designed for the insomniacs who enjoy dark interfaces as much as we do.
Stars: ✭ 1,034 (+2010.2%)
Mutual labels:  bootstrap
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+15965.31%)
Mutual labels:  bootstrap
Ipfs Textbook
[unmaintained] Helping me understand what IPFS is and how it works
Stars: ✭ 43 (-12.24%)
Mutual labels:  unmaintained
Laravel Settings
Simple Settings package for a laravel application
Stars: ✭ 45 (-8.16%)
Mutual labels:  bootstrap
Startbootstrap 2 Col Portfolio
A two column Bootstrap HTML portfolio template - created by Start Bootstrap
Stars: ✭ 40 (-18.37%)
Mutual labels:  bootstrap
Bootstrap Ie11
Internet Explorer 11 compatibility solution for Bootstrap 5
Stars: ✭ 47 (-4.08%)
Mutual labels:  bootstrap
Freelancers Market
Laravel Project to help freelance websites clients and freelancers to find each other.
Stars: ✭ 39 (-20.41%)
Mutual labels:  bootstrap
Availity Uikit
Availity UI Kit powered by Bootstrap 4
Stars: ✭ 44 (-10.2%)
Mutual labels:  bootstrap
Money
Money - let's you manage your money and visualize where your money goes. Built using Ruby 2.3.0, Rails 4.2.5, Backbone and Bootstrap
Stars: ✭ 48 (-2.04%)
Mutual labels:  bootstrap
Danyuan Application
初学者 spirng-boot版本
Stars: ✭ 47 (-4.08%)
Mutual labels:  bootstrap
Angular Bootstrap With Material Design
Angular Bootstrap with Material Design - Powerful and free UI KIT
Stars: ✭ 1,031 (+2004.08%)
Mutual labels:  bootstrap

Warning: this repository is unmaintained. Fork at your own risk.

bootstrap-imageupload

A Bootstrap/jQuery plugin to preview image uploads.

Table of contents

Demo

https://egonolieux.github.io/bootstrap-imageupload

Installation

Following installation options are available:

  • Download and include the files manually.
  • Install with npm: npm install bootstrap-imageupload --save.

Usage

$('#my-imageupload').imageupload(options);

HTML

Copy this snippet into your HTML.

<div class="imageupload panel panel-default">
    <div class="panel-heading clearfix">
        <h3 class="panel-title pull-left">Upload Image</h3>
        <div class="btn-group pull-right">
            <button type="button" class="btn btn-default active">File</button>
            <button type="button" class="btn btn-default">URL</button>
        </div>
    </div>
    <div class="file-tab panel-body">
        <label class="btn btn-default btn-file">
            <span>Browse</span>
            <!-- The file is stored here. -->
            <input type="file" name="image-file">
        </label>
        <button type="button" class="btn btn-default">Remove</button>
    </div>
    <div class="url-tab panel-body">
        <div class="input-group">
            <input type="text" class="form-control" placeholder="Image URL">
            <div class="input-group-btn">
                <button type="button" class="btn btn-default">Submit</button>
            </div>
        </div>
        <button type="button" class="btn btn-default">Remove</button>
        <!-- The URL is stored here. -->
        <input type="hidden" name="image-url">
    </div>
</div>

JavaScript

Options

Name Type Default
allowedFormats Array ['jpg', 'jpeg', 'png', 'gif']
maxWidth Number 250
maxHeight Number 250
maxFileSizeKb Number 2048

Methods

.imageupload(options)

Initializes bootstrap-imageupload. If no options are given, defaults are used.

$('#my-imageupload').imageupload({
    allowedFormats: [ 'jpg' ],
    maxFileSizeKb: 512
});
.imageupload('disable')

Disables user input.

$('#my-imageupload').imageupload('disable');
.imageupload('enable')

Enables user input (after being disabled).

$('#my-imageupload').imageupload('enable');
.imageupload('reset')

Resets bootstrap-imageupload to its initial state. Options from initialization are preserved.

$('#my-imageupload').imageupload('reset');

Limitations

The upload image by URL feature has the following limitations:

  • The URL must contain the filename including its extension.
  • The file size cannot be verified.

These limitations exist because the image element constructor is used to load the image. The only accurate method to verify the image format and file size, is to perform a HTTP HEAD request, which might not work because of the same origin policy. In order to avoid loading very large image files, a timeout of 3000ms is used.

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].