Hi, I have followed the doc here to create a local storage.

And then I start to use the local storage by two steps.

However, I failed to load the image through this way as below.

Could you help me with the bug? Looking forward to your reply.
Hi!
For Local files storage you have to use /data/local-files/1.png.
@smoreface Please, could you add to this doc section
https://labelstud.io/guide/tasks.html#Import-data-from-a-local-directory
a task example with the correct path to file (and maybe some note about /data/local-files/ path), like:
```
{
"data": {
"image": "/data/local-files/1.jpg"
}
}
Hi!
For Local files storage you have to use/data/local-files/1.png.
Hi, I tried your suggestion but failed again as below.

I want to know the requirement of setting the local path while adding the source storage. It is the absolute path of starting from the home directory as below.

Hi,
Isn't it suppose to be /data/local-files/?d=1.png
Or am i misunderstanding something
@makseq @li3cmz
@Morgadoooo yes, of course. You are right!
Hi!
For Local files storage you have to use/data/local-files/1.png.Hi, I tried your suggestion but failed again as below.
I want to know the requirement of setting the local path while adding the source storage. It is the absolute path of starting from the home directory as below.
Hi, if i'm not mistaking i got this info from : core.settings.base
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
So i think you can probably specify path regarding this info of BASE_DIR
Edit :
Nvm I misunderstood it
here is the code for get_data for local files (label_studio/io_storages/localfiles/models.py) :
document_root = Path(get_env('LOCAL_FILES_DOCUMENT_ROOT', default='/'))
relative_path = str(path.relative_to(document_root))
so regarding this :
If you didn't define a LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT env variable the base path will be /
Hi, if i'm not mistaking, I think that there maybe some inappropriate and misleading codes for get_data.
Maybe the environment variable LOCAL_FILES_DOCUMENT_ROOT should be replaced by self.path which is received from the Label Studio UI. And then we don't have to set the LOCAL_FILES_DOCUMENT_ROOT again.
At first I thought that there was no need to set LOCAL_FILES_DOCUMENT_ROOT again after setting Local path in the UI of Edit Source Storage, which caused the error that I mentioned above.
And the error appeared after I set the variable use_blob_urls to be true as the screenshot shown below.

Maybe the problem could be solved by more specific documentation for LOCAL_FILES_DOCUMENT_ROOT or changing the code.
@li3cmz Did you manage to import local files without errors?
What did you change in the initial example?
Most helpful comment
@smoreface Please, could you add to this doc section
https://labelstud.io/guide/tasks.html#Import-data-from-a-local-directory
a task example with the correct path to file (and maybe some note about
/data/local-files/path), like:```
{
"data": {
"image": "/data/local-files/1.jpg"
}
}