File Chooser blob URL only temporary?

Discussion and feedback on Construct 2

Post » Mon Jan 30, 2017 4:45 pm

Hi. I added a file chooser so the user can select an image. I store the blob URL into an array to access it again later and it seems to work fine in the current session. But when I close the browser and try to open the blob URL I get an error and no images is loaded. But how can I store/remember a selected pic if this does not work in a new session? Is there any workaround? Or is this only a problem in Preview mode? (I use LAN preview with IP)
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 762
Reputation: 9,615

Post » Mon Jan 30, 2017 10:29 pm

Have you tried storing the data with localstorage?
B
141
S
34
G
17
Posts: 1,561
Reputation: 21,065

Post » Wed Feb 01, 2017 4:14 pm

Yes, I store the array data as Json string with local storage and load it on launch. Debug shows that the data is saved and loaded properly but the blob:http:// links are not working when I start a new browser session. But I tried only in Preview so far with local IP.
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 762
Reputation: 9,615

Post » Wed Feb 01, 2017 7:22 pm

If you are sure it's not a problem with your code, then I think you should make a simple project to reproduce the problem, then fire a bug report about this.
B
141
S
34
G
17
Posts: 1,561
Reputation: 21,065

Post » Fri Feb 03, 2017 7:21 pm

I exported to NW.js and its the same there, so not only in preview. I created a bug report. But I am not sure if it's a bug or working as intended.
viewtopic.php?f=151&t=187229
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 762
Reputation: 9,615


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests