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 attachments and include in post content #1

Closed
billhanyu opened this Issue May 21, 2018 · 4 comments

Comments

Projects
None yet
1 participant
@billhanyu
Owner

billhanyu commented May 21, 2018

  • upload files (only supporting images is fine)
  • provide full paths to files to include in MarkDown
  • UI for uploading and copying links

Per @Lucytheanimefan 's feature request

@billhanyu billhanyu self-assigned this May 21, 2018

@billhanyu

This comment has been minimized.

Show comment
Hide comment
@billhanyu

billhanyu May 22, 2018

Owner

Not sure if I even want to provide the UI showing attachments for a single post...

Owner

billhanyu commented May 22, 2018

Not sure if I even want to provide the UI showing attachments for a single post...

@billhanyu

This comment has been minimized.

Show comment
Hide comment
@billhanyu

billhanyu May 22, 2018

Owner

Uploading files with progress bar shown & copying file path with one click 😄

Owner

billhanyu commented May 22, 2018

Uploading files with progress bar shown & copying file path with one click 😄

@billhanyu

This comment has been minimized.

Show comment
Hide comment
@billhanyu

billhanyu May 22, 2018

Owner

However, the current impl keeps files in the file system instead of in MongoDB, so backing up the data could mean trouble...

and no I did not think of this. 😢

Solution:

  1. uploading is implemented as an API, so that's good. Just need to delete the file from fs and store it in MongoDB instead in the API handler.
  2. When a request comes in for the file, instead of serving the files in a static directory, use an API endpoint to retrieve from MongoDB.
Owner

billhanyu commented May 22, 2018

However, the current impl keeps files in the file system instead of in MongoDB, so backing up the data could mean trouble...

and no I did not think of this. 😢

Solution:

  1. uploading is implemented as an API, so that's good. Just need to delete the file from fs and store it in MongoDB instead in the API handler.
  2. When a request comes in for the file, instead of serving the files in a static directory, use an API endpoint to retrieve from MongoDB.
@billhanyu

This comment has been minimized.

Show comment
Hide comment
@billhanyu

billhanyu May 22, 2018

Owner

Done and deployed 😆
Closing this now.

Owner

billhanyu commented May 22, 2018

Done and deployed 😆
Closing this now.

@billhanyu billhanyu closed this May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment