I am wondering if it is possible to install files to a specific directory other than the downloads folder using JavaScript.
For example, if I were downloading a video, it will install to \Videos\ rather than \Downloads.
I am wondering if it is possible to install files to a specific
directory other than the downloads folder using JavaScript.
No. Only the end-user is allowed to specify a download location in the browser other than the default download location. This is a security feature so web-sites and their Javascript cannot put files in locations of their choice on your hard drive (e.g. replace executables, add startup files, etc...).
If I understand your question correctly, the answer is nope, this is not possible!
Related
I have my businesses apk and apk decompiled files and I would like to add a .so file to my decompiled files in order for a script to run on start. Can someone help me?
I tried looking in the lib folder but I couldn’t find where to add it. Can someone show me where I would put this.
As said on this website on APK Building (summarizing the Android Dev Docs with links for further reading):
The Android Package Manager expects to find native libraries on filepaths inside the APK matching the pattern lib/<abi>/lib<name>.so, where <abi> is the name of the ABI the library was compiled for.
So, if the .so file in question was compiled for the AArch64 instruction set and therefore matches the arm64-v8a ABI, one has to place the file into the directory lib/arm64-v8a. Create the corresponding subfolder at need. The Android Dev Docs thereby provide a list of supported ABIs.
I've been trying to find a definitive list of the files I need to host on my update server for updates to work. There doesn't seem to be a concrete answer anywhere and the question has gone unanswered on their issue tracker.
Is win-unpacked folder, or do I only need the .exe, the .yml and the .exe.blockmap files?
The only required artifacts appear to be the installer executable and the latest.yml or equivalent.
I'm unsure what the minimum required for differential downloads is. They definitely require the .blockmap file and may also require uploading the win-unpacked folder (on Windows) but I'm not entirely sure.
I'm writting some typescript code and I would like that no other developpers can directly edit compiled files created with Typescript. Is there a way to automaticly make readonly generated files ? Or maybe to encrypt compiled files to force next devs to use typescript original files. I know if I write some comments like "Do not edit this file, use typescript version", they will not necessary be read...
Setting permission to prevent other developers from accessing the typescript files could be a tedious work. I suggest that you add comment on that typescript file that you want to protect from being modified so that other developers would be notified of your intention on that file.
Generally you separate your source files from your build files. Say for example you use Git you would only keep your source files in Git, not your build files. This way whenever another developer wants to work on your project they can only get the source files. They won't be able to change your build files because they do not have access to these.
Encrypting or making the files read only is not the way to go in this scenario. Educate your developers to not edit build files. And only share source files with your developers.
I have some files that I need to copy to a folder once the user has installed my app. I was trying to find a way to transfer the files directly from the application root directory but no luck. I had also seen a suggestion about zipping the files and including the zipped file in my package, then extracting them to the folder. But did not know how to implement either methods.
Another alternative is to download and install the files when the app starts, but didnt want to rely on having to maintain the files on a server or that the user always has internet access since my app can be run offline.
How do I do this with a Phonegap/JQM/Javascript app?
Thanks,
Robert
I'm looking for a package manager that can be added as a task in grunt that will download the latest version (maybe even a specific version ie: jquery v1.10 vs v2) of a library or js or css file and place it in a specific folder. Here is what I'm looking for:
Run grunt task that will download the latest version of jQuery UI (js and css).
Move the latest JS version of jQuery UI into assets/js and name the file jquery-ui.js
Move the latest CSS version of jQuery UI of no-theme into assets/css and name the file jquery-ui.css
Another example would be:
Run grunt task that will download the file at http://domain.com/css/grid.css.
Move that file to assets/css and name the file grid.css.
Lastly, I'd like a way to do an update that will allow me to update all scripts or css files that I specify, so it knows which files to try to update. Also, I'd prefer if the package manager didn't clutter the repo with many additional files.
Does something like this exist? I've looked into Bower and Jam, but I'm not seeing this ability.
Bower does indeed let you specify download url's for your packages.
From the bower.io site:
# Using a local or remote package
bower install <package>
Where <package> can be any one of the following:
....
A URL to a file, including zip and tar.gz files. It's contents will be extracted.
Then you should just run bower update whenever you need to update things. Obviously you should use a CDN of sorts to automagically get links to the latest versions of the files you need.
Bower's .bowerrc file should let you specify the installation directory for your components. Keep in mind that this will have to be project specific.
It does create and rename files it manages on its own way, but that's a good thing. Specially because it exposes a very nice API for you to use.
Solved this by using grunt-curl.
https://github.com/twolfson/grunt-curl