Copy link to clipboard
Copied
Hello, I'm the developer of the extension for Premier Pro. In the extension, I used the following request to get file size:
request.open('GET', "file:///" + filePath, true)
The documentation says that requests from the "file:///" domain can cause CORS errors like "Access to XMLHttpRequest at 'file:///path/filename.mp4' from origin 'XXX' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https". To avoid this problem, I used the --allow-file-access and --allow-file-access-from-files flags in the manifest. This worked for several years, however, in December of 2021 the CORS bug started appearing in spite of the flags. This is most likely due to the CEP update, but I did not find anything in the migration documentation regarding these flags. So my question is, why did this stop working, and what can be done to get around this problem?
You mention "December 2021"; is that when you updated to a current version of PPro?
This may help: https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_11.x/Documentation/CEP%2011.1%20HTML%20Extension%20Cookbook.md#migration-from-cep-10-to-cep-11
Copy link to clipboard
Copied
You mention "December 2021"; is that when you updated to a current version of PPro?
This may help: https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_11.x/Documentation/CEP%2011.1%20HTML%20Ex...
Copy link to clipboard
Copied
Why not use Node.js's fs module?
fs.readfileSync('path/to.file.ext', {encoding:'utf-8'});