Hello, everyone, I'm trying to upload a symbolic link file's contents through file provider.
The contents in createItem
is empty when the file is a symbolic link, so it needs to be uploaded according to the symlinkTargetPath
in item,
but I can't get the contenst according to the symlinkTargetPath.
For example, if I use ln - s test.md test.link
creates a symbolic link, the symlinkTargetPath
will only contain test.md
. If I use ln - s aaa/test.md test.link
creates a symbolic link, the symlinkTargetPath
will only contain aaa/test.md
, there is no specific path to the file. So how can I get the contents of the symbolic link file ?
When uploading a symbolic link, you are meant to upload a symbolic link to your server. Just upload the path contained within the symlink on disk, which is passed to you as symlinkTargetPath
as you pointed out.
You should not be uploading the contents of the symbolic links target. Upload an item to your server that has a type of symbolic link, with the path to the symlink target. And on remote computers, you should sync down a similar item, which is of type symbolic link, with the symlinkTargetPath populated.