Open NeverUsedID opened 6 years ago
Simply configuring a relative namespace wouldn't work since we would need to resolve it to absolute anyway. However it should be possible to simplify the mediaID based on the current pageID on the JavaScript side. This could always be done, no need for a setting.
PR welcome
Reason: We sync parts of Dokuwiki to other namespace in other dokuwikis. This will not work with images from ImgPaste, because the full path including all namespaces will written into the dokuwiki .txt file.
Example: Image is stored in /var/www/data/media/location01/networkplan/pasted/20181025-171042.png dokuwiki .txt is {{:location01:networkplan:pasted:20181025-171042.png}}
But on the synced Wiki on location 01 the namespace location01 is missing, because we synced all files directly to the first namespace networkplan.
Problem: the image is there, but its not in /var/www/data/media/location01/networkplan/pasted but in /var/www/data/media/networkplan/pasted/20181025-171042_.png
Solution: Option to paste relative path in the dokuwiki .txt wiki page. Example: {{.:pasted:20181025-171042_.png}}
Workaround: use ':imgpaste:@NS@:pasted:%Y%m%d-%H%M%S' as filename and sync the folder separately