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

[FB4 - Mac/Win] Managing local files with Extension Builder

Explorer ,
Oct 26, 2010 Oct 26, 2010

Copy link to clipboard

Copied

Hi,

I'm developing an InDesign CS5 Extension with FB4 and I have to say that as a Switchboard/PatchPanel user I'm really happy to be able to work with InDesign DOM inside Flash applications.

Everything is going just fine except for one "little" problem that's driving me crazy.

Basically my extension read an open InDesign document and upload every image within the document to a server using a WebService.

One of the parameter of this WebService is the image file data encoded in base64.

The question is:

how can I get the image content as string in order to convert it to base64 and send it to server?

I have the image file path but it looks like it's not possible to read local files, I know - it's an old security issue, but it looks also that other extensions (Kuler) are able to write files in system folders.

So far I tried building a function in JS and use a doScript in mxml but it doesn't work and so does the fileReference method.

Is there any workaround fot this?

Thanks

Views

481

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
Explorer ,
Oct 26, 2010 Oct 26, 2010

Copy link to clipboard

Copied

Ok, I fixed that File problem.

Flash Builder can obviously manage File object:

var myFile:File = new File(path);

What's really weird is that in CS5 (CS4 was different...) if I have an image object "image.itemLink.filePath" return a path like this one: "myUser:Desktop:image.jpg"

The fact is that the File object wants a path like:

"/Users/myUser/Desktop/image.jpg"

Damn CS5, is there a workaround for this instead of rebuilding the path?

Hope this will help.

Thanks again!

Votes

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
Guest
Oct 27, 2010 Oct 27, 2010

Copy link to clipboard

Copied

LATEST

This appears to be a Flex question. Please try the Flex forums here http://forums.adobe.com/community/flex/flex_general_discussion

Votes

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