-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7c40871
Showing
14 changed files
with
28,867 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
## 5.7.3 | ||
|
||
- Add `disablePreviews` option. | ||
- Fix IE problems with Symbols. | ||
|
||
## 5.7.2 | ||
|
||
- Base the calculation of the chunks to send on the transformed files | ||
- Properly display seconds (instead of ms) in error message when timeout is | ||
reached | ||
- Properly handle it when `options.method` is a function (there was a bug, which | ||
always assumed that it was a String) (thanks to @almdac) | ||
- Fix orientation on devices that already handle it properly (thanks to @nosegrind) | ||
- Handle additionalParams when they are an Array the way it's expected (thanks to @wiz78) | ||
- Check for `string` in error message type instead of `String` (thanks to @RuQuentin) | ||
|
||
## 5.7.1 | ||
|
||
- Fix issue with IE (thanks to @Bjego) | ||
|
||
## 5.7.0 | ||
|
||
- Cleanup the SVGs used to remove IDs and sketch attributes | ||
Since SVGs are duplicated this resulted in duplicate IDs being used. | ||
- Add a dedicated `displayExistingFile` method to make it easier to display | ||
server files. | ||
- Fix an error where chunked uploads don't work as expected when transforming | ||
files before uploading. | ||
- Make the default text a button so it's discoverable by keyboard. | ||
|
||
## 5.6.1 | ||
|
||
- Re-released due to missing javascript files | ||
- Removes `npm` dependency that got added by mistake | ||
|
||
## 5.6.0 | ||
|
||
- Timeout now generates an error (thanks to @mmollick) | ||
- Fix duplicate iteration of error processing (#159 thanks @darkland) | ||
- Fixed bootstrap example (@thanks to @polosatus) | ||
- The `addedfiles` event now triggers _after_ each individual `addedfile` event | ||
when dragging files into the dropzone, which is the same behavior as when | ||
clicking it. | ||
|
||
## 5.5.0 | ||
|
||
- Correct photo orientation before uploading (if enabled) (thanks to @nosegrind) | ||
- Remove a potential memory leak in some browsers by keeping a reference to `xhr` inside the individual | ||
chunk objects (thanks to @clayton2) | ||
- Allow HTML in the remove links (thanks to @christianklemp) | ||
- `hiddenInputContainer` can now be an `HtmlElement` in addition to a selector String (thanks to @WAmeling) | ||
- Fix default values on website (since the last deployment, the default values all stated `null`) | ||
|
||
## 5.4.0 | ||
|
||
- Fix IE11 issue when dropping files | ||
|
||
## 5.3.1 | ||
|
||
- Fix broken npm release of 5.3.0 | ||
|
||
## 5.3.0 | ||
|
||
- Add `dictUploadCanceled` option (thanks to @Fohlen) | ||
- Fix issue with drag'n'drop on Safari and IE10 (thanks to @taylorryan) | ||
- Fix issues with resizing if SVG files are dropped (thanks to @saschagros) | ||
|
||
## 5.2.0 | ||
|
||
- **Migrated from coffeescript to ES6!** | ||
- **Added chunked file uploading!** The highly requested chunked uploads are now available. Checkout the | ||
`chunking` option documentation for more information. | ||
- Fixed a faulty `console.warning` (should be `console.warn`) | ||
- If an input field doesn't have a name, don't include it when sending the form (thanks to @remyj38) | ||
- Opera on Windows Phone is now also blacklisted (thanks to @dracos1) | ||
- If a custom preview element is used, it is now properly handled when it doesn't have a parent (thanks to @uNmAnNeR) | ||
|
||
## 5.1.1 | ||
|
||
- Fix issue where showing files already on the server fails, due to the missing `file.upload.filename` | ||
- Fix issue where `file.upload.filename` gets removed after the file uploaded completed | ||
- Properly handle `arraybuffer` and `blob` responses | ||
|
||
## 5.1.0 | ||
|
||
- Add possibility to translate file sizes. (#16 thanks to @lerarybak for that) | ||
- Fix duplicate filenames in multiple file uploads (#15) | ||
- The `renameFilename` option has been **deprecated**. Use `renameFile` instead | ||
(which also has a slightly different function signature) | ||
- The `renameFile` option now stores the new name in `file.upload.filename` (#1) | ||
|
||
## 5.0.1 | ||
|
||
- Add missing dist/ folder to npm. | ||
|
||
## 5.0.0 | ||
|
||
- **Add support for browser image resizing!** Yes, really. The new options are: `resizeWidth`, `resizeHeight`, `resizeMimeType` and `resizeQuality`. | ||
Thanks a lot to [MD Systems](https://www.md-systems.ch/) for donating the money to make this a reality. | ||
- Fix IE11 issue with `options.timeout` | ||
- Resolve an issue that occurs in the iOS squashed image fix, where some transparent PNGs are stretched inaccurately | ||
|
||
## 4.4.0 | ||
|
||
- Add `options.timeout` | ||
|
||
## 4.3.0 | ||
|
||
Added Changelog. Sorry that this didn't happen sooner. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Contribute | ||
========== | ||
|
||
> **I'm in the process of making some substantial changes to this library, | ||
> so please DO NOT create any PRs. I will simply close them.** | ||
|
||
When I'm done, these rules will apply: | ||
|
||
|
||
Communicate | ||
----------- | ||
|
||
Before you start implementing new features, please create an issue about it | ||
first and discuss your intent. | ||
|
||
It might be something that someone else is already implementing or that goes | ||
against the concepts of Dropzone, and I really hate rejecting pull requests | ||
others spent hours writing on. | ||
|
||
|
||
Developer Dependencies | ||
---------------------- | ||
|
||
The first thing you need to do, is to install the developer dependencies: | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
This will install all the tools you need to compile the source files and to test | ||
the library. | ||
|
||
|
||
ECMAScript 6 & Sass (-> Javascript & CSS) | ||
------------------------------------------ | ||
|
||
Since June 2017, Dropzone is written in [ECMAScript | ||
6](https://babeljs.io/learn-es2015/) and [Sass](http://sass-lang.com/). | ||
|
||
|
||
Testing | ||
------- | ||
|
||
To test the library simply run `npm run test`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
LICENSE | ||
|
||
(The MIT License) | ||
|
||
Copyright (c) 2021 Matias Meno <m@tias.me> | ||
Logo (c) 2015 "1910" www.weare1910.com | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<img alt="Dropzone.js" src="http://www.dropzonejs.com/images/new-logo.svg" /> | ||
|
||
Dropzone.js is a JavaScript library that turns any HTML element into a dropzone. | ||
This means that a user can drag and drop a file onto it, and the file gets | ||
uploaded to the server via XHR. | ||
|
||
The file either gets uploaded directly to the configured URL, or you can handle | ||
and manage the file upload yourself. | ||
|
||
|
||
If you want support, please use the [discussions | ||
section](https://github.com/dropzone/dropzone/discussions) or | ||
[stackoverflow](https://stackoverflow.com/questions/tagged/dropzone.js) with the | ||
`dropzone.js` tag and **not** the GitHub issues tracker. Only post an issue here | ||
if you think you discovered a bug or have a feature request. | ||
|
||
|
||
* * * | ||
|
||
> **Please read the [contributing guidelines](CONTRIBUTING.md) before you start | ||
> working on Dropzone!** | ||
|
||
<img alt="Dropzone Screenshot" width="585" src="http://i.imgur.com/Xf7QvVG.png" /> | ||
|
||
|
||
Quickstart | ||
---------- | ||
|
||
The recommended way to install Dropzone is with [yarn](https://yarnpkg.com) and | ||
[webpack](http://webpack.js.org). I'll provide an example project soon! | ||
|
||
[Download the standalone files](https://github.com/dropzone/dropzone/releases/latest/download/dist.zip) and import them on your website. | ||
(The JavaScript files in there are UMD modules, compatible with requirejs). | ||
|
||
For more information, please consult the [Documentation](https://dropzone.gitbook.io/dropzone/). | ||
|
||
Dropzone does **not** depend on jQuery but has jQuery integration. | ||
|
||
Main features | ||
------------- | ||
|
||
- Beautiful by default | ||
- Image thumbnail previews. Simply register the callback `thumbnail(file, data)` | ||
and display the image wherever you like | ||
- Retina enabled | ||
- Multiple files and synchronous uploads | ||
- Progress updates | ||
- Support for large files | ||
- Complete theming. The look and feel of Dropzone is just the default theme. You | ||
can define everything yourself by overwriting the default event listeners. | ||
- Browser image resizing (resize the images before you upload them to your | ||
server) | ||
- Well tested | ||
|
||
Documentation | ||
------------- | ||
|
||
For all the configuration options and installation guide please visit [the documentation site](https://dropzone.gitbook.io/dropzone/) | ||
|
||
## Examples | ||
|
||
For examples, please see the [GitLab wiki](https://github.com/dropzone/dropzone/wiki). | ||
|
||
|
||
Server side implementation | ||
-------------------------- | ||
|
||
Dropzone does *not* provide the server side implementation of handling the | ||
files, but the way files are uploaded is identical to simple file upload forms | ||
like this: | ||
|
||
```html | ||
<form action="" method="post" enctype="multipart/form-data"> | ||
<input type="file" name="file" /> | ||
</form> | ||
``` | ||
|
||
To handle basic file uploads on the server, please look at the corresponding | ||
documentation. Here are a few documentations, if you think I should add some, | ||
please contact me. | ||
|
||
# Compatibility | ||
|
||
Dropzone supports all current browsers and IE up to IE11. | ||
|
||
For all the other browsers, dropzone provides an oldschool file input fallback. | ||
|
||
# MIT License | ||
|
||
See LICENSE file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "enyo/dropzone", | ||
"description": "Handles drag and drop of files for you.", | ||
"homepage": "http://www.dropzonejs.com", | ||
"keywords": [ | ||
"dragndrop", | ||
"drag and drop", | ||
"file upload", | ||
"upload" | ||
], | ||
"authors": [{ | ||
"name": "Matias Meno", | ||
"email": "m@tias.me", | ||
"homepage": "http://www.matiasmeno.com" | ||
}], | ||
"license": "MIT", | ||
"minimum-stability": "dev" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.dropzone, .dropzone * { | ||
box-sizing: border-box; | ||
} | ||
|
||
.dropzone { | ||
position: relative; | ||
} | ||
.dropzone .dz-preview { | ||
position: relative; | ||
display: inline-block; | ||
width: 120px; | ||
margin: 0.5em; | ||
} | ||
.dropzone .dz-preview .dz-progress { | ||
display: block; | ||
height: 15px; | ||
border: 1px solid #aaa; | ||
} | ||
.dropzone .dz-preview .dz-progress .dz-upload { | ||
display: block; | ||
height: 100%; | ||
width: 0; | ||
background: green; | ||
} | ||
.dropzone .dz-preview .dz-error-message { | ||
color: red; | ||
display: none; | ||
} | ||
.dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark { | ||
display: block; | ||
} | ||
.dropzone .dz-preview.dz-success .dz-success-mark { | ||
display: block; | ||
} | ||
.dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark { | ||
position: absolute; | ||
display: none; | ||
left: 30px; | ||
top: 30px; | ||
width: 54px; | ||
height: 58px; | ||
left: 50%; | ||
margin-left: -27px; | ||
} |
Oops, something went wrong.