Skip to content

Support Uploading to Cloud Storage Providers #14

@kiran94

Description

@kiran94

Summary

Today, maim.nvim only supports uploading to the user's local computer. There may be some use cases where we want to upload the image to a cloud storage provider first and then embed the link we get back into the document.

This means the document is much more portable as when sharing the document with others, you do not need to include all the images as extra files.

Concept

A new command: MaimUpload which does the following:

graph TD

MaimExecutable[maim]
MaimNvim[maim.nvim]
UserDocument[Document in Buffer]
CloudProvider[Cloud Provider]

MaimNvim-->|1.user executes MaimUpload command|MaimExecutable
MaimExecutable -->|2.takes a screenshot, saves in local temp file|Local
MaimNvim-->|3.takes the local temp file, uploads to the configured cloud provider|CloudProvider
CloudProvider-->|4.Gives a link back|MaimNvim
MaimNvim-->|5.embed the link into the document|UserDocument
Loading

Example cloud provider

  • Github CDN
    • When you drag a image into a GitHub issue or pull request description, it will automatically upload it for you and provide back a link
    • Would need to find a way to do this programatically
  • Imgur

Reference

https://www.reddit.com/r/neovim/comments/13u4wpt/comment/jm1ifjr/?utm_source=share&utm_medium=web2x&context=3

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions