I am trying to get the file edited time in Node.js
There is a way to get the certain file edited time.
For example if I know the file path, then I can get the file edited time using fs.stat.
So I would like to know the path of file that just edited.
For example, If I edit file in D/New Folder how can I get that path?
Perhaps is it impossible?
If it is impossible what about ASP.NET?
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 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'm trying to recheck a file on a timed interval. I'm not sure if this can be accomplished, but any help would be greatly appreciated. I understand that as PHP is server-sided, it cannot accomplish my task, so anything with JavaScript is fine.
By rechecking a file, I mean getting a file's contents, but only if it's updated. Somewhat like "if file gets new contents, output them."
If you are checking on a remote file, then the PHP solution would be best: simply send the file and its checksum, then when the checksum changes, the file has been updated.
If you're working with a local file, then (if I'm seeing things right) you'll need a browser with the HTML5 File API. May be a duplicate of this: Check if file has changed using HTML5 File API
Hello when ever i try to retrieve the full path of the browsed file by using *
request.getParameter()
***only the file name is being returned to the next jsp file.
Can someone help me..
Thanks in advance
When you upload a file you will get only the File Name and not the entire path that you see in the file upload field. This path is of user file system. If you want to save the file, you need to save it in server side directory path.