Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload file plugin #23

Closed
shivshankardayal opened this issue Jan 13, 2021 · 6 comments
Closed

Upload file plugin #23

shivshankardayal opened this issue Jan 13, 2021 · 6 comments

Comments

@shivshankardayal
Copy link

bytemd needs an upload file plugin.

@pd4d10
Copy link
Owner

pd4d10 commented Jan 13, 2021

Does @bytemd/plugin-import-image meet your needs?

@shivshankardayal
Copy link
Author

shivshankardayal commented Jan 13, 2021

No it does not. But I guess I can write a plugin to accept any file type.

@pd4d10
Copy link
Owner

pd4d10 commented Jan 13, 2021

Yeah, it is easy to write your own plugin.

Just curious about what this use case is

@shivshankardayal
Copy link
Author

Yes I guess I will use image plugin. There are many other ways to do files which are easier.

@pd4d10
Copy link
Owner

pd4d10 commented Feb 28, 2021

As image uploading is a very common feature in practice, we make it built-in in the latest version:

<Editor
  uploadImages={async (files) => {
    // upload images to your server
    return [
      {
        url: '',
        alt: '', // optional
        title: '' // optional
      }
    ]
  })
/>

@bytemd/plugin-import-image is deprecated.

@0gust1
Copy link

0gust1 commented Aug 24, 2022

We also need a file upload feature. We'll look into custom plugin (as stated, it's not that different of the image upload plugin).

The use case is enable users to upload a file and generate a link to this file in the document.=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants