Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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