Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
fix(#25): use form element to reset input after files added to vue-tr…
Browse files Browse the repository at this point in the history
…ansmit (#28)

* chore: npm dependency update

* fix(#25): use form el to reset file input after added-files

BREAKING CHANGE: The hidden file input is now wrapped in a form element (potentially breaking some more custom layouts if the file input was used in a way apart from the default). The `fileInputStyles` data attr is renamed to `formStyles` and placed on the form wrapper element instead of the file input.
- Use a form wrapper element to reliably reset the file input after adding files. This will allow browsers to upload the same file twice, where previously the `change` event would not fire due to the filename not changing.

* feat: enhanced xhr response error

"Error during upload: {{ statusText }} [{{ statusCode }}]"

* chore(docs): add info on using test app

* chore(test): updates to test app

* chore: build
  • Loading branch information
alexsasharegan authored Jan 12, 2018
1 parent 4fa3634 commit bee472e
Show file tree
Hide file tree
Showing 19 changed files with 231 additions and 245 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ interface FilesSlotProps {

## Usage

If you have PHP installed on your machine, you can clone this repo and open up a working test app by running:

```sh
npm test
```

Now navigate to [http://localhost:3030/](http://localhost:3030/).

```html
<template>
<main id="root" class="mt-5">
Expand Down
3 changes: 2 additions & 1 deletion dist/src/components/VueTransmit.vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export default class VueTransmit extends Vue {
thumbnailQueue: any[];
files: VTransmitFile[];
defaultHeaders: object;
fileInputStyles: object;
formStyles: object;
readonly inputEl: HTMLInputElement;
readonly formEl: HTMLFormElement;
readonly filesToAccept: string;
readonly multiple: boolean;
readonly acceptedFiles: VTransmitFile[];
Expand Down
22 changes: 16 additions & 6 deletions dist/vue-transmit.browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-transmit.browser.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue-transmit.browser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-transmit.browser.min.js.map

Large diffs are not rendered by default.

22 changes: 16 additions & 6 deletions dist/vue-transmit.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-transmit.common.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue-transmit.common.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-transmit.common.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit bee472e

Please sign in to comment.