Browse Source

@uppy/dashboard: use webkitRelativePath when querying a file's relative path (#3766)

- fixes missing "relativePath" meta property when adding files via the "Browse Folder" link in the dashboard with Chrome or Edge
Eduard Müller / taktik 2 years ago
parent
commit
2f0b39b8dc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/@uppy/dashboard/src/Dashboard.jsx

+ 1 - 1
packages/@uppy/dashboard/src/Dashboard.jsx

@@ -380,7 +380,7 @@ export default class Dashboard extends UIPlugin {
       meta: {
         // path of the file relative to the ancestor directory the user selected.
         // e.g. 'docs/Old Prague/airbnb.pdf'
-        relativePath: file.relativePath || null,
+        relativePath: file.relativePath || file.webkitRelativePath || null,
       },
     }))