How do I extract file

0 favourites
  • 8 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • hi to all, i have added an image in my app, and i would like, when the user click on the button install, i would like that file to be extracted from the app to the desktop for example, it is possible?

    thanks

  • Wouldn't the Browser plugin action 'Invoke Download' do this?

    from manual:

    "Invoke download

    Invoke a URL as a file download in the browser. Even if this points to a web page or document, it will be downloaded as a file in the browser interface. The URL can point to any address on the Internet, or it can be the name of any imported project file, or it can be a data URL (useful for downloading canvas snapshots). The filename parameter allows you to choose the filename the browser gives to the download, which can be different to the name of the resource being downloaded."

    https://www.scirra.com/manual/110/browser

  • the think is, i dont want for the user to see a downloading window, or confirmation i want just the file to be extracted from the app to the desktop for example

  • Security isn't going to allow that. It is far too risky. It would mean any site could theoretically install anything they like.

  • but ithe file is inside the app and compiled after for windows so it runs locally not from the web

  • nope i still can't copy a file from the app "files" folder to my hdd, and also can't copy a file from an ftp to a folder in my hdd :s

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't know what you've tried but for a text file you'd "request project file" with AJAX and then use "write file" "on completed". But it doesn't work with binary files like png's for instance.

    A png file can be saved but it won't open as a png file. I looked in the contents of the saved file and by comparing it with the original png file it appears to be encoded as a different codepage since it's being treated as text. So in short "invoke download" is the only built in option to get a png project file to save to the hard drive. Although presumably there may be some unexposed node-webkit function that works with binary files.

  • well i have done this One butto download, so i put:

    on clicked, AJAX request "link+file"

    on AJAX lastdata comleted nodewebkit WRITE "c:\temp" to file Ajaxlastdata.

    but that doenst work

    how to simply copy a file from an ftp to the hard disk??

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)