How to access version of a . exe file with Javascript?

Asked

Viewed 51 times

0

I’d like you to help me solve a little problem.

I need to access the property called "version" in my file, and I know this is done in Javascript. But I don’t know which tag to use, or what to do to get to that. How can I do this?

  • A file type . txt, . doc, image/*? Files of this type?

  • No. a file . exe

  • Using Javascript is not possible. All you can access is the size, type, last modification date and name, see https://w3c.github.io/FileAPI/#dfn-file

  • you could indicate something possible to check his version?

  • of course.. but preferably one that connects with Webdesing

  • There are questions in [so], for example https://stackoverflow.com/questions/16524899/getting-file-creation-date-and-author-in-javascript-or-html?rq=1, which show that it is not possible.

Show 1 more comment

1 answer

2


Through Javascript only, there is no way to access version of a file .exe.

If you are using File(), according to the W3C, the only values returned from a given file are:

  • The sequence of bytes;
  • The size of the file;
  • The file name;
  • The type of file;
  • The date of last modification;

As stated in the comments also, reinforcing the response:

[...] Not even the path is exposed [...]

By the comment already rising it is not possible to discover even the real way that was accomplished the upload. This issue of user privacy is really taken very seriously by W3C.

You can read more about in this other related question: How to find out which folder the user uploaded?

  • Just to be clear, not even the path is exposed. It is hidden under a fakepath

  • 1

    Yes @Jeffersonquesado, I asked such a question a long time ago https://answall.com/q/187157/66203, and I received an answer explaining. [en.so] itself shows C:/fakepath at upload time.

  • great question, by the way

  • 1

    Very old @Jeffersonquesado, one of my first xD.

  • Someone thinks it is possible to do the same thing but in another language.. php type?

  • @Alis with PHP I believe it is possible. Take a look at stat()

  • Could you spare a few more tips?

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.