I am trying to save a script as binary in extendscript so a client cannot view our code but I am running into an issue. Hopefully someone here knows a workaround.
In my script I have it calling to include an outside data file to pull informational values the script needs;
#include "/Users/GratefullyDyed/Sublimation/data.js";
Now I need to change that file path to the path that will be on my clients computer. When I do that and try to save as binary I get an error that "file path does not exist", because the file path is on their computer and not mine.
Is there a simple way around this I am missing?
Thanks!
Related
So, I have a firebase storage server, and I wish to store the path to every uploaded file inside a text file, for future reference. So, every time I upload a file, I will read my paths text file from the server, then add the latest path/string to it, then re-upload it. The only thing being is that I don't think we can upload a String to firebase just like that. How do I convert the modified string back into a file? Upon that, I do not know how to read data from the downloaded text file to, so any help would be highly appreciated.
Thanks!
I recently made a Python app where I take an Excel file, convert it to a CSV file, and then shoot it out with an Email. I tried turning this application into a Web App and here is where issues arose. In order to send the a file using Email, I need to get the full file path and I am not sure how to get it. In order to let the user pick out the file, I used <input type="file">, but this only supplies me with the name of the file and not the actual file path. Any suggests on what I should do to fix this issue?
Use the os module in python.
import os
os.path.abspath('/path/to/file')
I have an application built with AngularJS and node.js that takes in a csv file, does some work on it and then outputs it.
Currently the only way I can output it is:
<a download="fileName.csv" ng-href="{{file}}">fileName.csv</a>"
But this will always put it in the 'Downloads' folder. Is there a way to ask for the destination and use that to output the file?
AFAIK There's no way to pick where the file ends up on the client machine, that's determined by their browser. It's going to your downloads folder because that's the default location.
I am creating browser based video editing tool. I want a user to first download a ~70mb javascript file and store it somewhere on his computer. I want to link that file when my website is opened. How can I achieve that.
EDIT
What i meant is that there are various files like js1.js,js2.js... all sums upto 70mb . So i will offer a zip folder to download and only link js1 or js2 file etc depending on the effects user wish to apply
i am sorry to inform you but i think there is something really wrong with what you are trying to do.
A "solution" would be to just cache the javascript on the user's browser so any subsequent requests parse the cache instead of requesting the resource again from the server.
You should know however that if you are in need to download ~70mb of a javascript file you are doing something wrong. I have a whole web app project that when published the total size is around 60mb, all files required to properly run included, and its a damn big codebase in there.
I find it very hard to believe there is ever a need for a single javascript file to be that big, in any case maybe a simple caching should do the trick
That is actually done automatically. Once you add a <script> tag with a link to a local js file (also stored on the server) the file is loaded automatically.
See HTML <script> src Attribute for more information on that.
You can only reference to js files on the server. Files on the server could look like this:
index.html
somefancyjsfile.js
You can then reference from inside your html file to the js file via the <script> tag.
I'm not sure though if the size is not a bit too much...
I read this post
securing the source code in a node-webkit desktop application
I would like to secure my font files and I was thinking this snapshot approach might be a way. So instead of running this
nwsnapshot --extra-code application.js application.bin
Could I run
nwsnapshot --extra-code font_file font_file.bin
Then in package.json add this?
snapshot: 'font_file.bin'
Or would there be an alternative mechanism to reference the binary font? Would it be possible to convert the CSS file referencing the font into binary? Can anything else other than javascript be converted to binary?
One dumb thing you can do is to add your assets to the exe file as stated here:
https://github.com/nwjs/nw.js/wiki/How-to-package-and-distribute-your-apps#step-2a-put-your-app-with-nw-executable
Basically you have to create a zip of your content (included your package.json) and rename it to "package.nw" then you can "merge it" into the exe file by typing this if you're in windows (the link explains how to do this in other OS's):
`copy /b nw.exe+app.nw app.exe `
This is not a great security measure (beacuse it can be opened as a zip file) but is one step further.
Another thing that could add security to your files is to encrypt them and then add them dinamically through js (while decrypting them) for this you could use the encrypt and decrypt methods available in node.
http://lollyrock.com/articles/nodejs-encryption/
However the weakest point in the application is still the packages.json file and for this nw provides nothing.
Cheers!