I have a CEP panel which is downloading a proxy video from an external source then scripting its import into Premiere Pro. Currently I'm running Premiere Pro on Windows (10).
The panel is currently downloading to the system temporary directory, but it looks like Premiere Pro or ExtendScript is massaging the supplied file name, which is causing an error for some reason. For example if the panel downloads to:
C:\Users\Philip\AppData\Local\Temp\2017-09-23T215101Z_1_LWD0012KBA6VB_RTRWNEV_C_6151-STORM -MARIA-DOMREP.MP4
then this is pushed into Premiere Pro with app.project.importFiles ([File(fileName)]) then the application pops up an error dialog:
File Import Failure
~\AppData\Local\Temp\2017-09-23T215101Z_1_LWD0012KBA6VB_RTRWNEV_C_6151-STORM-MARIA-DOMREP. MP4
Unsupported format or damaged file.
Note that:
a) The file itself is fine and I can manually import it into Premiere Pro successfully.
b) If I change the panel so it downloads to a directory outside of the home/library area, for example "C:\temp" then the importFiles() call also works file. This isn't a very satisfactory workaround though as it means hardwiring the download location.
It looks like maybe there's an inconsistency in the handling of the file name; the fully qualified Windows file name is being converted to a Unix/OSX "~" relative file name, but then Premiere Pro can't make use of that file name.
Is this a bug?