![]() |
selecting file to upload
I just input a new upload script on my site. Works a wonder, all i want to do now is limit what files they can select to upload. I know you can allow them to upload only specific files but thats not what i mean. When the dialog opens to select the file off their machine i want it so they can only see .torrent files, rather than all files. I did a quick search on the web but was not sure what to search for and couldent get nothing out of what i did search for.
|
There is a standard for an accept attribute, but it is not widely supported in browsers. I am afraid you are trapped in front-end support dark zone on this one. I think only opera and chrome browsers support his. And even if they are supported, the only standard mime type for a torrent file there is are bittorrent files.
So you can try using HTML Code:
<input type="file" accept="application/x-bittorrent" name="werew" />You can try use javascript, to verified only. I don't think it would let the dialog to only show .torrent files. There are also some flash laternatives, like uploadify But there is no sane option in this problem. P.S. I think this thread fits better under TalkPHP > Misc. Support & Development » Javascript, AJAX, E4X |
I had worked on something similar but I never found a solution. Not sure there is one.
|
| All times are GMT. The time now is 06:37 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0