• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Transfer zip inside a script as string?

Valorous Hero ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

I found that you can use an online converted to take a whole zip folder of (in my case, light-weight text files or png images) and make just one Base64 string from it! (https://www.browserling.com/tools/file-to-base64)

 

That's cool, so supposedly it works and now I am thinking I can write this down into the filesystem using the binary encoding, maybe I'll get a zip file out of it on which I'll do file.execute() and get the user started on unzipping it. But any time I wrote anything, it was text! So I thought, maybe I have to use the atob() function which does not exist in ExtendScript to convert it to binary first?

 

Well, I tried this below polyfill - the only one I could find and all it does is crash my Illustrator.
https://github.com/MaxArt2501/base64-js

 

Anyone have a solution that will write an executable zip file from a string?

TOPICS
Scripting

Views

81

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
no replies

Have something to add?

Join the conversation
Adobe