How do I Save an Array with Binary Data ?

0 favourites
  • 5 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hi,

    I know how to save an file chooser image into local storage and and load it using Binary data.

    also i know how to save Array in to local storage as JASON and load it back as JASON and get into the Array.But my problem is how to put a file chooser image url in an array and save it locally and load it and display the image ? Hope this make sense

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can write the binary data as a string by using the binarydata.getbase64 expression. You can put this string into an array if you wish. The array can the be saved and loaded as json as normal, and then you can load it into the binary data plugin again with the set from base64 expression.

    As the manual notes, this is significantly less efficient than using the ajax object to post binary data directly to a server directly.

  • Thanks you for your reply.I didn't see your reply until today,for the time been i had a alternate solution.but i will try what you suggest.I actually dont need to save image url on a server,what i wanted is to save in a array and and save in local storage.Thank you for your help.i will come back once i check your method.

  • Hi i have tried your method.It does save the binary data in array and when i get it back it perfectly giving the value from base64,and it also gives the binary url perfectly.But whe i load that binary url to image sprite the image does not show up ?

  • You ever figure this out?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)