mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-28 17:29:19 +00:00
fix(ui/modules/Common/Form/DroppableTextArea): use getPathFromUri
This commit is contained in:
parent
0d526abde1
commit
1aa110ba8b
1 changed files with 4 additions and 4 deletions
|
|
@ -5,6 +5,8 @@ import QtQuick.Dialogs 1.2
|
|||
import Common 1.0
|
||||
import Common.Styles 1.0
|
||||
|
||||
import Utils 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Item {
|
||||
|
|
@ -26,10 +28,8 @@ Item {
|
|||
function _emitFiles (files) {
|
||||
// Filtering files, other urls are forbidden.
|
||||
files = files.reduce(function (files, file) {
|
||||
var result = file.match(/^file:\/\/(.*)/)
|
||||
|
||||
if (result) {
|
||||
files.push(result[1])
|
||||
if (file.startsWith('file:') {
|
||||
files.push(Utils.getPathFromUri(file))
|
||||
}
|
||||
|
||||
return files
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue