Skip to content

Commit

Permalink
v1.0.0 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
paulosabayomi committed Feb 11, 2024
1 parent 9c92898 commit 89e53cd
Show file tree
Hide file tree
Showing 25 changed files with 3,048 additions and 582 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 1.0.0

- Added chunk upload
- Fix: file persistent storage method, files are now stored as ObjectURL on https and base64 on http
- New: Added auto upload for files added to the UI when files are still uploading
- New: Added option display_file_sources: if set to false the file sources will not be listed on the default UI.
- New: New event: 'file_source.closed' event that gets triggered when file source popup is closed.
- New: New method: display_message
- New: New method: get_file_sources
- New: Added two options to file_upload option: chunk_size and should_chunk.
- New: Added messages option for configuring messages with timeout option.
- New: Added event 'default_ui.shown' and 'default_ui.closed'.
- New: Added clear_persisted_files method.
- New: Added close_file_source_popup method.
- New: Added new option show_upload_progress_bar.
- New: Added upload_all_finished event.
- New: Added select_file_from_device method.

## 0.2.0

- New: Added custup options typescript types
Expand Down
6 changes: 5 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ module.exports = function(grunt) {
ext: '.min.css'
},
{
'src/all.min.css': ['styles/bare.css', 'styles/custup.css', 'styles/detached.css', 'styles/profilePicture.css', 'styles/resumeUploaderUI.css']
'src/all.min.css': [
'styles/bare.css', 'styles/custup.css',
'styles/detached.css', 'styles/profilePicture.css',
'styles/resumeUploaderUI.css', 'styles/elegant.css'
]
}
]
}
Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Please keep comment here to allow auto update -->
<!-- [END BADGES] -->

![CustUp Init](https://github.com/paulosabayomi/CustUp/blob/master/_assets/custup-default.png)
![CustUp Default UI type](https://github.com/paulosabayomi/CustUp/blob/master/_assets/custup-default.png)

CustUp is a highly customizable library with zero dependency, and can be easily adapted to a wide range of applications.

Expand All @@ -18,9 +18,10 @@ CustUp which is the short for Customizable Uploader was made to be >95% customiz

### Things you might want to know about CustUp

- Easily change the UI design or create your own UI just by overriding or adding to the CSS classes of the Elements
- With the instance attachment feature, you can create multiple CustUp instances and upload all files at once together with form fields and/or additional data
- You can get all the selected files and upload them manually
- Choose the UI type that fits your project.
- Easily change the UI design or create your own UI just by overriding or adding to the CSS classes of the Elements.
- With the instance attachment feature, you can create multiple CustUp instances and upload all files at once together with form fields and/or additional data.
- You can get all the selected files and upload them manually.
- You don't need to worry about installing HTTP client to manage your upload requests because axios was bundled into CustUp which you can easily configure.

## Documentation Homepage
Expand Down Expand Up @@ -268,8 +269,10 @@ const instance4 = new CustUp({
instance4.upload();
```

`single_upload` when set to true and used with `instance_attach` it is useful if all files should be uploaded at once, if `false` then upload event will be triggered for each of the files in all of the attached instances

`single_upload` when set to true and used with `instance_attach` it is useful if all files should be uploaded at once, if `false` then upload event will be triggered for each of the files in all of the attached instances.

See more guides on the [documentation page](https://custup.pryxy.com/docs/category/guides).

## Options

| Option | type | default | Required | Description |
Expand Down Expand Up @@ -303,7 +306,7 @@ persist_files | `boolean` | `false` | Not required | To persist files in the bro
persist_type | `soft` or `hard` | `soft` | Not required | To set the `persist_files` storage method, if `soft` CustUp will use `sessionStorage` to temporarily store files and if `hard` CustUp will use `localStorage` to store files.
alert_timeout_time | `number` | `300` milliseconds | Not required | The timeout for CustUp alerts

There are many more other options, read the documentation for more options
There are many more other options, read the [documentation for more options](https://custup.pryxy.com/docs/category/options)

## All Options

Expand Down Expand Up @@ -470,6 +473,8 @@ options = {
}
```

See all available options [here](https://custup.pryxy.com/docs/category/options)

## Events

CustUp has events that can be subscribed to
Expand Down Expand Up @@ -535,6 +540,8 @@ And many more events, read the documentation for more events
*/
```

Check out more events [here](https://custup.pryxy.com/docs/events)

## Methods

There are several methods that can be used to customize the library to your taste, example, to dynamically call the `upload` method
Expand All @@ -560,18 +567,18 @@ retry_upload | To trigger upload retry for all files that were not uploaded due
| clear_files | To clear all the added files from the memory, browser storage and UI | `None` |
| get_total_file_count | Returns all total number of added files, it will only return total number of selected files if `count_default_files` is set to false | `None` |

And many more, read more about CustUp methods in the documentation
And many more, read more about [CustUp methods in the documentation](https://custup.pryxy.com/docs/methods)

## Inspiration

When I was working on a freelance project that has a custom file upload UI design some years back, I searched for libraries that can fit into the design or ones that has an option to change the UI style to fit into my project and that does not have any dependencies but I couldn't find any that fit into the description and I had to write a custom implementation for the file uploader from scratch, then I decided to build a file upload library that fits into the description of the library I couldn't find then.

## Upcoming Features

- [ ] Upload resumable
- [ ] Chunk upload
- [ ] React js version
- [x] Typescript version/support
- [x] React js version
- [x] Chunk upload
- [ ] Upload resumable
- [ ] Onedrive implementation

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion __test__/custup.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import CustUp from '../src/custup'
const instance1 = new CustUp({})

expectType<CustUp>(instance1);
expectType<false | undefined>(instance1.initializeUI());
expectType<CustUp | undefined>(instance1.initializeUI());
Loading

0 comments on commit 89e53cd

Please sign in to comment.