2
I am trying to get the complete path of the directory through the file type input, but so far I can only get a previous folder, for example, I have the folder in the C:/user/Documents/Images/Yesterday then I would like to take this whole way, but I can only get the briefcase yesterday, the code I’m making is
$('#pasta').change(
function absolutepath(e){
var aqrs;
var theFiles = e.target.files;
alert(theFiles[0].webkitRelativePath);
});
With this code above it grab the first file with the folder with the input below:
<input type="file" id="pasta" multiple webkitdirectory />
How do I take it all the way?
Actually, I’m going through something similar. I’m uploading with image resizing, I need to throw the path of this image into an input, and I’m struggling to do that. Is there another way? Something that can be done? @Laerte, what’s your suggestion?
– Hebert Richard
Unfortunately this is a limitation imposed by the specification and implemented by the browsers, it is a security measure there is nothing we can do, but in your case you want to replicate the image sent by the user to another input?
– Laerte
The images go to a server folder, the file name is an md5. I need the path to save to the bank. That path, I throw in input. In the other system that I used, the image appeared, I clicked with the right button and took the path of the image. But I don’t want it to be like this, I prefer automatic, the user ends up getting lost in simple things...
– Hebert Richard