@@ -235,24 +235,26 @@ The callbacks receive a `Array<UploaderResult>`:
235235
236236``` javascript
237237{
238- fileUrl: " https://upcdn.io/FW25..." , // The URL to use when serving this file.
239-
240- editedFile: undefined , // The edited file (if present). Same as below.
238+ fileUrl: " https://upcdn.io/FW25..." , // URL to use when serving this file.
239+ filePath: " /uploads/example.jpg" , // File path (we recommend saving this to your database).
240+
241+ editedFile: undefined , // Edited file (for image crops). Same structure as below.
241242
242243 originalFile: {
243- accountId: " FW251aX" , // The Upload.io account that owns the file.
244- file: { ... }, // DOM file object (from the <input> element).
245- fileId: " FW251aXa9ku..." , // The uploaded file ID.
246- fileUrl: " https://upcdn.io/FW25..." , // The uploaded file URL.
247- fileSize: 12345 , // File size in bytes.
248- mime: " image/jpeg" , // File MIME type.
249- suggestedOptimization: {
250- transformationUrl: " https://upcdn.io/.." , // The suggested URL for serving this file.
251- transformationSlug: " thumbnail" // Append to 'fileUrl' to produce the above URL.
244+ fileUrl: " https://upcdn.io/FW25..." , // Uploaded file URL.
245+ filePath: " /uploads/example.jpg" , // Uploaded file path (relative to your raw file directory).
246+ accountId: " FW251aX" , // Upload.io account the file was uploaded to.
247+ originalFileName: " example.jpg" , // Original file name from the user's machine.
248+ file: { ... }, // Original DOM file object from the <input> element.
249+ size: 12345 , // File size in bytes.
250+ lastModified: 1663410542397 , // Epoch timestamp of when the file was uploaded or updated.
251+ mime: " image/jpeg" , // File MIME type.
252+ metadata: {
253+ ... // User-provided JSON object.
252254 },
253- tags: [ // Tags manually & auto-assigned to this file.
254- { name : " tag1" , searchable : true },
255- { name : " tag2" , searchable : true } ,
255+ tags: [
256+ " tag1" , // User-provided & auto-generated tags.
257+ " tag2" ,
256258 ...
257259 ]
258260 }
0 commit comments