Skip to content

Commit ed61e7f

Browse files
committed
Release 2.1.0
1 parent 8b17f79 commit ed61e7f

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,24 +170,25 @@ The callbacks receive a `Array<UploaderResult>`:
170170

171171
```javascript
172172
{
173-
fileUrl: "https://upcdn.io/FW25...", // The URL to use when serving this file.
173+
fileUrl: "https://upcdn.io/FW25...", // URL to use when serving this file.
174174

175-
editedFile: undefined, // The edited file (if present). Same as below.
175+
editedFile: undefined, // Edited file (for image crops). Same structure as below.
176176

177177
originalFile: {
178-
accountId: "FW251aX", // The Upload.io account that owns the file.
179-
file: { ... }, // DOM file object (from the <input> element).
180-
fileId: "FW251aXa9ku...", // The uploaded file ID.
181-
fileUrl: "https://upcdn.io/FW25...", // The uploaded file URL.
182-
fileSize: 12345, // File size in bytes.
183-
mime: "image/jpeg", // File MIME type.
184-
suggestedOptimization: {
185-
transformationUrl: "https://upcdn.io/..", // The suggested URL for serving this file.
186-
transformationSlug: "thumbnail" // Append to 'fileUrl' to produce the above URL.
178+
fileUrl: "https://upcdn.io/FW25...", // Uploaded file URL.
179+
filePath: "/uploads/example.jpg", // Uploaded file path (relative to your raw file directory).
180+
accountId: "FW251aX", // Upload.io account the file was uploaded to.
181+
originalFileName: "example.jpg", // Original file name from the user's machine.
182+
file: { ... }, // Original DOM file object from the <input> element.
183+
size: 12345, // File size in bytes.
184+
lastModified: 1663410542397, // Epoch timestamp of when the file was uploaded or updated.
185+
mime: "image/jpeg", // File MIME type.
186+
metadata: {
187+
... // User-provided JSON object.
187188
},
188-
tags: [ // Tags manually & auto-assigned to this file.
189-
{ name: "tag1", searchable: true },
190-
{ name: "tag2", searchable: true },
189+
tags: [
190+
"tag1", // User-provided & auto-generated tags.
191+
"tag2",
191192
...
192193
]
193194
}

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-uploader",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"author": "Upload <hello@upload.io> (https://upload.io)",
55
"description": "React File Upload UI Widget — Lightweight & supports: drag and drop, multiple uploads, image cropping, customization & more 🚀 Comes with Cloud Storage 🌐",
66
"license": "MIT",
@@ -73,7 +73,7 @@
7373
"react": ">=16.3.0"
7474
},
7575
"dependencies": {
76-
"uploader": "^2.0.0"
76+
"uploader": "^2.1.0"
7777
},
7878
"devDependencies": {
7979
"@babel/cli": "7.17.6",

0 commit comments

Comments
 (0)