Pregunta

I'm using jquery.ui.plupload for uploading files.

Is there some way of detecting if a selected file is encrypted/password protected at the time file is selected for uploading?

¿Fue útil?

Solución

Is there some way of detecting if a selected file is encrypted/password protected at the time file is selected for uploading ?

Unless, the encrypted files have a dedicated mime type (which I doubt) I'm afraid it would be really difficult :

  • current release of plupload does not give direct access to the file's binary data. (Though I guess it might be possible with beta of plupload 2.0 )
  • encryption / password protection mechanism will depend on the file type. Only dedicated client side readers would be able to read the binary data client side and return the info (from the file or its meta-data). For example, for pdf files, you would need library like pdf.js too try to open the file (not even sure, it would give out the info about encryption/pwd protection, even though it seems to be able to handle the feature)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top