Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmetaksungur/aksfileupload
File upload tool
https://github.com/ahmetaksungur/aksfileupload
aks drag-and-drop drag-drop file jquery jquery-plugin preview uplaod-file upload
Last synced: 11 days ago
JSON representation
File upload tool
- Host: GitHub
- URL: https://github.com/ahmetaksungur/aksfileupload
- Owner: Ahmetaksungur
- License: mit
- Created: 2020-12-07T12:46:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T17:19:06.000Z (3 months ago)
- Last Synced: 2024-10-06T22:16:31.536Z (about 1 month ago)
- Topics: aks, drag-and-drop, drag-drop, file, jquery, jquery-plugin, preview, uplaod-file, upload
- Language: JavaScript
- Homepage: https://codepen.io/collection/APgoJG
- Size: 6.02 MB
- Stars: 19
- Watchers: 3
- Forks: 8
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aksFileUpload.js
File upload tool![aksFileUpload.js-ahmet-aksungur](https://github.com/Ahmetaksungur/aksfileupload/blob/main/aksfileuplaod.gif?raw=true)
**[View the Demo on CodePen →](https://codepen.io/collection/APgoJG)**
## Getting Started
Compiled and production-ready code can be found in the `dist` directory.
### 1. Include aksFileUpload.min.js on your site.
**Direct Download**
You can [download the files directly from GitHub](https://github.com/Ahmetaksungur/aksfileupload/archive/main.zip).
```html
```
```html
```
**CDN**
```html
```
```html
```
---```html
```
```html
```
**jQuery**
```html
```
---**NPM**
```bash
npm i aksfileupload
```## Document aksFileUpload.js
```html
``````js
$(function () {
$("#aks-file-upload").aksFileUpload({
fileUpload: "#uploadfile", // With target [input]file or [type]json you can save the data of loaded items
fileType: ["pdf", "docx", "rtf", "jpg", "jpeg", "png"], // allowed file formats
dragDrop: true, // drag & drop upload
maxSize: "90 GB", // maximum uploaded file size
multiple: true, // multiple file upload
maxFile: 50, // maximum number of uploaded files
maxFileError: "File exceeds upload limit. - Max limit:", // error text
maxSizeError: "File exceeds size. - Max limit:", // error text
fileTypeError: "Disallowed file format.", // error text
label: "Drag & Drop your files or Browse" // label text
});
});
```### Ajax Upload
```html
``````js
$(function () {
$("#aks-file-upload").aksFileUpload({
fileUpload: "#uploadfile", // With target [input]file or [type]json you can save the data of loaded items
fileType: ["pdf", "docx", "rtf", "jpg", "jpeg", "png"], // allowed file formats
dragDrop: true, // drag & drop upload
maxSize: "90 GB", // maximum uploaded file size
multiple: true, // multiple file upload
maxFile: 50, // maximum number of uploaded files
// ajax file upload
ajaxUpload: true,
ajax: {
directlyLoad: false, // direct loading file permit
url: "upload.php",
type: "POST",
contentType: false,
processData: false,
cache: false,
async: true,
enctype: "multipart/form-data"
},});
});
```
##### upload.php
```php