How do I let users save an image in Win10?

Get help using Construct 2

Post » Wed May 11, 2016 10:26 am

Hi. I added some wallpapers to my app and let users download/open them. It seems to work on mobile where Browser: Invoke Download (filename) just opens the image to save it and then use it as wallpaper. But when I try it on Win10 (Visual Studio) the image replaces the entire app and the user cant interact with it to save it.
I downloaded the latest beta of C2 to enable the Back Button and added a "Browser: On Mobile Back Button" action but its not executed when the image is shown cause it seems to replace the entire app/c2 code. Any ideas how I can fix this?

Can I use "Browser: Open in new Window" for local files instead of a web address too?
If this works its still something to fix to allow saving of canvas snapshots with Invoke Download.

/Edit: Tried to open new window with just "filename.jpg" as URL but I get this error in Visual Studio:
SCRIPT87: Unhandled exception at line 348, column 184 in ms-appx://02928669-06b8-42a9-a2ba-576529eb0129/c2runtime.js
0x80070057 - JavaScript runtime error: Falscher Parameter.
"logo-burst-standard.jpg" ist kein gültiger absoluter URI.
WinRT information: "logo-burst-standard.jpg" ist kein gültiger absoluter URI.
c2runtime.js (348,184)
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 756
Reputation: 9,591

Post » Wed May 11, 2016 12:40 pm

As workaround I think I will just upload the images to my webserver and then open the images in a new browser window but it would be great if someone has another solution (or a fix from Scirra to allow invoke download in Win10). :)
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 756
Reputation: 9,591

Post » Wed May 11, 2016 5:30 pm

If you found a bug, consider posting a proper bug report for it, following the bug report guidelines.

If I understand your description you are basically opening an image in a new browser tab, the image being from your own application, correct ?
It seems like that is just something that Win10 doesn't allow from the look of the error message you are getting.
At worst, consider taking a canvas snapshot of your image and provide it as URI (See the system action "Snapshot canvas").

I don't use Win10 or Win10 devices so I cannot help further, but if there is indeed an issue with C2, without a proper bug report it won't be fixed.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306

Post » Thu May 12, 2016 7:08 am

Right now I just use "Invoke Download" and it shows the image and replaces the entire app. Only Rightclick>Copy works, no back button or anything else until you restart the entire app.
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 756
Reputation: 9,591


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 34 guests