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)
B
54
S
16
G
6
Posts: 719
Reputation: 9,207

Post » Mon Jan 30, 2017 10:29 pm

Have you tried storing the data with localstorage?
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

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.
B
54
S
16
G
6
Posts: 719
Reputation: 9,207

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
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

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
B
54
S
16
G
6
Posts: 719
Reputation: 9,207


Return to Construct 2 General

Who is online

Users browsing this forum: rbailey83 and 33 guests