Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jenky committed Dec 22, 2015
1 parent 55a41be commit 51feafc
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ Create new uploader.

Renders the uploader. You can customize this by passing a view name.

##### 3. Use package js file to initialize Plupload (Optional)

If you do not want to write your own js to initialize Plupload, you can use the `upload.js` file that included with the package in `resources/views/vendor/plupload/assets/js`. Make sure that you already have `jQuery` loaded on your page.

**Initialize Plupload**

```js
<script>
$(function () {
createUploader('my_uploader_id'); // The Id that you used to create with the builder
});
</script>
```

The following method is available if you use the `upload.js` file.

**Uploader options**

**setOptions(array $options)**

Set uploader options. Please visit https://github.com/moxiecode/plupload/wiki/Options to see all the options. You can set the default global options in `config/plupload.php`
Expand All @@ -83,21 +101,6 @@ Set uploader options. Please visit https://github.com/moxiecode/plupload/wiki/Op
->render() !!}
```


##### 3. Use package js file to initialize Plupload (Optional) (beta)

If you do not want to write your own js to initialize Plupload, you can use the `upload.js` file that included with the package in `resources/views/vendor/plupload/assets/js`. Make sure that you already have `jQuery` loaded on your page.

**Initialize Plupload**

```js
<script>
$(function () {
createUploader('my_uploader_id'); // The Id that you used to create with the builder
});
</script>
```

**Automatically start upload when files added**

Use `setAutoStart()` in your builder before calling render() function.
Expand Down

0 comments on commit 51feafc

Please sign in to comment.