javascript - how to get only folder path name without file name using file upload control in Ruby on rails? -


is other way slected folder path other using fileupload control ?

using file upload control getting filename need selected folder path , possible folder path ?

code:

<input id="filetoupload" type="file" size="45" style="width:300px;" name="filetoupload" onchange="addfiles(this, this.value,this.value);" class="input">  <select name="mcffiles" id="mcffiles" size=5 style="width:200px; height:100px">  function addfiles(selectobject, seltext, selvalue)     {             alert(seltext);          alert(selvalue);         var optionobject = new option(seltext,selvalue);         var optionrank = document.getelementbyid("mcffiles").options.length;         alert(optionrank);         if(optionrank <= 4)         {             document.getelementbyid("mcffiles").options[optionrank]= optionobject;         }         else            alert('only 5 files can select')      } 

if mean folder path on client no, javascript can not access local file system read.

if want allow upload of entire folder content (which guess why asking), have embed flash or similar.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -