How to change the download folder in Google Chrome Extension? - google-chrome

When downloading a file, I specify the file name like this:
chrome.downloads.onDeterminingFilename.addListener
But you need to change the file save folder. Actually the question is: how can this be done? What method to use?
The only thing I've come up with is to cancel the download and start a new one in the right folder.

Related

Is there a way to instead of re-downloading a file simply open the already downloaded file?

I frequently have to reopen files from a link, or find it somewhere on the downloads folder. It is not that important and far too many downloads to properly save and sort them for when I will or will not need later.
So is there a way to simply make firefox (or chrome) open the already downloaded file instead downloading it again ?

Error when opening project on Construct 2

I'm getting this error when I open the project on Construct 2, How can i solve this problem?
This error is indicating that the file within the project is no longer available to load. Therefore it must have been deleted or moved.
You will need to go to the games directory and place biru.png within the texture directory.
This should help with the error, once the project is opened you can then delete the object or try find where the original file is.
You can fix this,
Open the layouts folder.
Open each xml file and search for Keyword "biru.png"
Once you located that, remove this event where it exists.
Save the XML and close editor.
Go back and open the "New project.caproj"
If the Porject extension isn't ".caproj"
First make a backup copy of this project file.
Right click on project and name it as .zip file.
Unzip the file
Navigate into Layouts folder
Open each xml file and search for Keyword "biru.png"
Once you located that, remove this event where it exists.
Save the XML and close editor.
Go back and open the "New project.caproj"

How to change the look of the "Index Of" page

I am creating a site that allows the person to download the file. The way im doing it now is just uploading the files and folders so if the person wanted something they would go to that folder and download it.
If i wanted to style it like add text how would I do that. If it is done with a html file, i have to create a new .html file for every single file on the server.
If you're running apache, you should configure .htaccess files.
check also this : http://adamwhitcroft.com/apaxy/

Can the code in a .crx chrome app have write access to the files within itself (the crx)?

I have a crx that has a number of files that I want to be able to change over time. For example, it might have this structure:
index.html
js/code.js
images/someimage.png
I want to be able to use ajax (or JSONP) to download a new image and overwrite image/someimage.png (after the crx has been installed into chrome). Is this possible?
No, you can not modify the application / extension data files directly.
But, you can store a downloaded image to chrome.storage, chrome.fileSystem, or chrome.syncFileSystem. At run time you can check to see if a downloaded image is there and swap out your image reference. E.g. use a dataURL or blob.

turn folder into a zip file

I have a folder on my desktop and i want to convert it into a .zip file. It shouldnt ask me were to save it but just save it straight to my desktop or any folder i specified.
I tried ASZip, fZip etc. but i can't get it to work. There isn't any of them that seem to let me just add a folder and zip it.
I was only able to create a byteArray wit ASZip but when i saved it, it left me with a file that was not able to be opened.
Would it be possible to achieve what i want without the use of an external library?
Any help would be appreciated.
You can't actually zip a folder but you can zip all the contents inside the folder. You would have to use FileReferenceList to load in flash all the files inside the folder.
FileReferenceList allows you to have multiple selection in the browse window.
Then you would have to pass all these files to the zip managing library and get a ByteArray from it.
This byte array you would localy dump inside a "yourFileName.zip" by using FileReference.save().
The application cannot save the file to a predetermined location. The user has to pick the location using the "save to" prompt.