--allow-file-access and --allow-file-access-from-files flags doesn't work

New Here ,
May 18, 2022 May 18, 2022

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?

TOPICS
SDK

Views

80

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , May 18, 2022 May 18, 2022

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

Likes

Translate

Translate
Adobe Employee ,
May 18, 2022 May 18, 2022

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...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

LATEST

Why not use Node.js's fs module?

fs.readfileSync('path/to.file.ext', {encoding:'utf-8'});

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines