HTTP Client generates local filesystem links that PhpStorm cannot open
When I use HTTP Client to download files that are configured to open with external apps and filename contains square brackets, PhpStorm generates a console link that throws an error:
### Download stuff
< {%
client.global.set("filename", "test [1].xsls");
%}
GET https://example.com/generate-excel.php
>>! /home/alvaro/files/{{filename}}
File is saved just fine, it's just the link what doesn't work.
Is there an issue tracker ticket for this?
请先登录再写评论。
https://youtrack.jetbrains.com/issue/IJPL-68144/HTTP-Client-Support-opening-response-in-web-browser
It's an Excel file so I don't open it in the browser but with LibreOffice Calc. (This is a KDE Plasma desktop running on Ubuntu, BTW). Recently there's been some PhpStorm plugin that would open the file in the IDE itself and I had to change some obscure setting to disable that.
That feature request seems to be about HTML. With other file types, it's already a thing.
Are any 3rd party plugins involved? Could you please share the plugin name(s)?
To clarify… I've always been able to (and I still can) open an Excel file in LibreOffice Calc by clicking on the link that PhpStorm generates. I only get the malformed URL message whenever the file name has characters like square brackets (my assumption is that the generated “file:” URI is not properly URL-encoded, but I may be wrong).
A few months ago, after some upgrade, links started opening inside the IDE (just the first tab in the document), and I disabled that by changing “Advanced Settings/ Open file as table if detected by scripted load” to “None”. I don't know what tools provides that “Data” tab.
Alvaro Thank you for the clarification, I reproduced the same in my test. I created below YouTrack ticket to our Http Client team to check further, please follow it for the update.
https://youtrack.jetbrains.com/issue/IJPL-175406/Cant-open-response-file-in-xsls-format-with-associated-application
I found a workaround and it is mentioned in the ticket, you can just click the “Fix” link when the error pops up, add the path of your desired application to the custom path of the “Default Browser”.
File | Settings | Tools | Web Browsers and Preview