Open roytoh opened 3 months ago
I manage to edit the script to directly replace that ${originalname} to include a requirement to remove spaces.
Sorry for this method because i'm not IT background, I only knew html and sql, currently learning js
The file attached is main.js in the plugin file.
When there are spaces in the filename, the attachment is named in url encode, and I would like to be able to display the spaces properly
When there are spaces in the filename, the attachment is named in url encode, and I would like to be able to display the spaces properly
Url not possible to have spaces if not mistaken. I'm self learn coder so theory i might not good. But as i saw website or url don't have spaces. So i think not possible to display space in url encode.
Do i get your question correct?
When there are spaces in the filename, the attachment is named in url encode, and I would like to be able to display the spaces properly
Url not possible to have spaces if not mistaken. I'm self learn coder so theory i might not good. But as i saw website or url don't have spaces. So i think not possible to display space in url encode.
Do i get your question correct?
What I mean is that when inserting an image in an obisidian file, this plugin will automatically name it for me, and I want to use the current md filename as the name of the attachment, at this point, if there are spaces in the md filename, then there will be spaces in the name of the attachment in the form of url encode.
For example, when the file name is Java scripts
, when I use the filename variable as the name of the attachment, then the name of the attachment will be modified as Java%20scripts
I tested ${originalname.replace(/\s/g, '')}
But still can't remove space from original file name
There was no real expression language support in this plugin, it's just a replacement. So you can't use replace()
in ${}
, if you want to remove the space of your attach file, this plugin may not helping your.
I tested ${originalname.replace(/\s/g, '')}
But still can't remove space from original file name