Using CEP panel to download and import file

New Here ,
Mar 25, 2022 Mar 25, 2022

Copy link to clipboard

Copied

Trying to download file, it downloads and data becames corrupted after saving it...

 

const response = await fetch("https://some_url.mp3");
const content = await response.text();
window.cep.fs.writeFile(new CSInterface().getSystemPath(SystemPath.EXTENSION)+'/cache/music.pdf',content)

 

Any ideas?

TOPICS
How to , SDK

Views

61

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 , Mar 28, 2022 Mar 28, 2022
You're writing to your extension's own directory, which will invalidate its signature and prevent the host from loading it in future sessions. 

Likes

Translate

Translate
Adobe Employee ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

LATEST

You're writing to your extension's own directory, which will invalidate its signature and prevent the host from loading it in future sessions. 


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