Skip to content

Commit 340b637

Browse files
committed
Update changelog to version 1.2.0
1 parent b7bf18f commit 340b637

File tree

3 files changed

+54
-12
lines changed

3 files changed

+54
-12
lines changed

CHANGELOG.md

+43-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,48 @@
1111
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
1212
Thils file also consider all dropzone-ui [releases](https://github.com/dropzone-ui/dropzone-ui-react/releases).
1313

14+
## [1.2.0](https://github.com/files-ui/files-ui-react/releases/tag/v1.1.0) (2024-01-21)
15+
16+
## 🧪 🚀 Allow uploading files with different URLs
17+
18+
- Enhanced components to perform the upload operation with a different urls for each [ExtFile](https://www.files-ui.com/types#extfile).
19+
- [ExtFile](https://www.files-ui.com/types#extfile): Added a new property in ExtFile type: `uploadUrl`.
20+
- [\<Dropzone/\>](https://www.files-ui.com/components/dropzone) & [\<FileInputButton/\>](https://www.files-ui.com/components/fileinputbutton): There is a new sub-prop `uploadConfig.customUrl()` that is a fucntion that given an extFile object, obtains a custom url.
21+
- The order of priority is as follows:
22+
- 1) ExtFile.uploadUrl
23+
- 2) DropzoneProps.UploadConfig.customUrl
24+
- 3) DropzoneProps.UploadConfig.url
25+
26+
- The setup can be as follows:
27+
28+
```jsx
29+
...
30+
return(
31+
<React.Fragment>
32+
<Dropzone
33+
uploadConfig={
34+
customUrl: (extFile)=> "https://urlfromserver/" + extFile.name
35+
}
36+
/>
37+
<FileInputButton
38+
uploadConfig={
39+
customUrl: (extFile)=> "https://urlfromserver/" + extFile.name
40+
}
41+
/>
42+
<Dropzone
43+
onChange={updateFiles}
44+
value={files}
45+
>
46+
{files.map((file) => (
47+
<FileMosaic key={file.id} {...file} uploadUrl={"https://urlfromserver/" + extFile.id}/>
48+
))}
49+
</Dropzone>
50+
51+
52+
</React.Fragment>
53+
)
54+
```
55+
1456
## [1.1.0](https://github.com/files-ui/files-ui-react/releases/tag/v1.1.0) (2023-12-17)
1557

1658
## 🧪 New features and 🐛 :hammer: Improvements
@@ -35,7 +77,7 @@ Thils file also consider all dropzone-ui [releases](https://github.com/dropzone-
3577

3678
- [\<FileCard/\>](https://www.files-ui.com/components/filecard): This new component is an alternative version of FileMosaic. It displays the file info in a card. Receives the same props as FileMosaic plus `elevation`.
3779

38-
- [\<FileInputButton/\>](https://www.files-ui.com/components/dropzone): This component replaces the old "InputButton" component. The features are the same as the dropzone except the header and footer related features. That means that this component now can trigger the upload progress.
80+
- [\<FileInputButton/\>](https://www.files-ui.com/components/fileinputbutton): This component replaces the old "InputButton" component. The features are the same as the dropzone except the header and footer related features. That means that this component now can trigger the upload progress.
3981
Validation is optional, so non valid files can be uploaded.
4082

4183
- [\<Avatar/\>](https://www.files-ui.com/components/avatar): This new component is designed tohandle the selection of images for changing the avatar. Can recieve as source an string url or even a File.

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@files-ui/react",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "UI components for file uploads with React js",
55
"main": "./build/index.js",
66
"module": "./build/index.es.js",
@@ -68,7 +68,7 @@
6868
},
6969
"dependencies": {
7070
"@dynamicss/dynamicss": "^2.2.8",
71-
"@files-ui/core": "latest"
71+
"@files-ui/core": "^2.0.4"
7272
},
7373
"publishConfig": {
7474
"access": "public"

0 commit comments

Comments
 (0)