Open
Description
🚀 The feature, motivation and pitch
When you copy and paste an image directly to obsidian, the default name given is "Pasted image " + date and time.
Can we have this same behavior?
Alternatives
When pasting an image from clipboard, obsidian.nvim currently requires an image name. Otherwise it will fail pasting, logging "Invalid file name" when the string is empty.
if fname == "" then
log.err "Invalid file name"
return
end
A similar behavior to Obsidian would be to fallback to a formatted name when the name string is empty:
if fname == "" then
fname = string.format("Pasted image %s", os.date "%Y%m%d%H%M%S")
else
log.err "Invalid file name"
return
end
Additional context
This is what it looks like to paste an image from clipboard directly to Obsidian.
NOTE: I know there is an option to setup the image name but img_name_func
is user specific. My feature request is default behavior.