diff --git a/packages/insomnia-app/app/common/import.js b/packages/insomnia-app/app/common/import.js index bdd35d08b..832b0a4d7 100644 --- a/packages/insomnia-app/app/common/import.js +++ b/packages/insomnia-app/app/common/import.js @@ -50,7 +50,8 @@ export async function importUri( const path = uri.replace(/^(file):\/\//, ''); rawText = fs.readFileSync(path, 'utf8'); } else { - throw new Error(`Invalid import URI ${uri}`); + // Treat everything else as raw text + rawText = decodeURIComponent(uri); } const result = await importRaw(getWorkspaceId, rawText); diff --git a/packages/insomnia-app/app/ui/redux/modules/global.js b/packages/insomnia-app/app/ui/redux/modules/global.js index 71d3347cf..41a196288 100644 --- a/packages/insomnia-app/app/ui/redux/modules/global.js +++ b/packages/insomnia-app/app/ui/redux/modules/global.js @@ -103,7 +103,7 @@ export function newCommand(command, args) { title: 'Confirm Data Import', message: ( - Do you really want to import {args.uri}? + Do you really want to import {args.name || args.uri}? ), addCancel: true,