jthrilly commented on issue #552: URL: https://github.com/apache/cordova-plugin-file/issues/552#issuecomment-1635617304
In case it is useful to anyone, a neat (and quick) way of replacing the required parameters without needing to faff with a regex is: ``` const fileURL = await resolveLocalFilesystemURL(fileEntry); if (process.env.NODE_ENV === 'development') { // Whatever runtime env detection you need const url = new URL(fileURL); url.host = 'localhost'; url.port = ''; return url.toString(); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org