Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Save file in Application.persistentDataPath

Discussion in 'WebGL' started by WILEz1975, Nov 24, 2021.

  1. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    368
    I can't understand how saving files with WebGl works.
    I need to save a .gif image generated during the program execution.
    In editor it works, but not on web.
    If I understand correctly Application.persistentDataPath is a kind of playerPref in WebGL and only saves key-value pairs.
    I would like to save the file, on a folder on the server, not on the user's hd.
    Screenshot_26.png
    This is the indexDB after saving on my server.
     
    Last edited: Nov 24, 2021
  2. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    368
    My files appear to be saved.
    How can I check that everything is ok?

    Screenshot_27.png

    If I try to open the file directly it won't find it.

    Screenshot_28.png

    I now have a key-value . So I have to rebuild the gif file from the value string? :eek:
     
    Last edited: Nov 28, 2021