'Why is webkitRelativePath always empty in Safari browser?

I need to support folder upload in my website similar to Google Drive.

I'm using webkitdirectory for this. Using webkitdirectory sets webkitRelativePath for all sub-files of the selected folder. But this only works for Firefox and Chrome.

Is there are any way to achieve the same result in Safari Browser? That could be helpful too, thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source