mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-18 18:04:50 +02:00
Show a preview image in builtin attachment select autocomplete.
This commit is contained in:
parent
aa95f130db
commit
f0d0a78f65
6 changed files with 65 additions and 6 deletions
|
@ -101,6 +101,7 @@ class AttachmentPathResolver
|
|||
/**
|
||||
* Converts a path passed by parameter from services.yaml (which can be an absolute path or relative to project dir)
|
||||
* to an absolute path. When a relative path is passed, the directory must exist or null is returned.
|
||||
* Returns an absolute path with "/" no matter, what system is used.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
|
@ -132,8 +133,8 @@ class AttachmentPathResolver
|
|||
return null;
|
||||
}
|
||||
|
||||
//Otherwise return resolved path
|
||||
return $tmp;
|
||||
//Normalize file path (use / instead of \)
|
||||
return str_replace('\\', '/', $tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue