xardbaiz / joplin-plugin-hackmd

Quick share notes on HackMD
12 stars 2 forks source link

FR: Upload attachments to file hosting #2

Closed graphit0 closed 2 years ago

graphit0 commented 2 years ago

As of now while sending notes to hackmd, the attachments are lost i.e. links to local storage no longer work.

There's a possibility that uploading them to file hosting is outside of the scope of this plugin (might be better used by a separate plugin). Yet I felt important enough to warn about the issue.

If author is to consider integrating file hosting, one may recommend oshi.at (perl) or pastor (rust) : it's Foss and has got a cli.

thank you for consideration

xardbaiz commented 2 years ago

FYI: images uploading is in the roadmap Didn't think about other attachment types yet

graphit0 commented 2 years ago

I understand that this is the matter of decision to include (or exclude) the feature from the plugin scope, right?

On one hand replacing resources (images or not) with links to uploaded files is pretty general feature and might be useful on its own (still benefiting the most from coordination with the hackmd publishing plugin).

On another hand, uploading images using internal logic of hackmd might be easier to implement and would be the most efficient in terms of effort to result ratio. That's probably what you meant on the roadmap, isn't it?

Personally, I think I would love to see this feature separately from the plugin because it would open up the possibility to process files in Joplin via online services (stimulate the further plugin development) - for example, search the image with a link, reduce quality, convert to other formats (publish as an archive for binaries), convert link to QR code, etc.

In any case, thanks for taking the time to respond. I imagine once the decision is made, the issue may be safely closed.

xardbaiz commented 2 years ago

In the scope of this plugin, only images can be uploaded on resources such as imgur.com and only for using them in the uploaded notes

For replacing local images with uploaded without uploading note itself, you're right - it should be a separate feature / plugin. Because I can't imagine how to reuse image uploading of this plugin for image replacing of local resources and in local notes. If you need a plugin like that - you can create a Plugin Request on Joplin Forum (or search for an existing request) and provide the link - I will take a look.

P.S. oshi.at or pastor are temporary storage, not persistent. If you replace local resources with uploaded, you could lose access to your attachments soon