Skip to content
Advertisement

C Web Browser Download File

WebkitGTK+ API Reference

What I’m trying to do is run my HTML5 app on Linux that way I and my users can still use my app without relying on an internet connection.

My problem is when I go to download say a zip file. The download doesn’t execute because there isn’t an adequate url for the file to save to (like the desktop). Therefore it doesn’t download.

Thus my question relies onto how am I suppose to get an adequate url to download this file when it’s executed dynamically via JSZip. (It works fine in Chrome, just not in my app). Terminal says…

source.c:35:3: warning: ‘return’ with a value, in function returning void [enabled by default] return TRUE; ^

Here’s my code:

JavaScript

Advertisement

Answer

1) Your basic premise is sound:

file:///home/michael/Downloads/test.zip // This syntax should allow you to “upload” a local file on your hard drve

2) This is a compile warning (not an error). In theory, you could ignore it:

JavaScript

3) This is the problem:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement