writefreely
writefreely copied to clipboard
Add file uploading and file sharing functionality
- I need to upload media files such as images and use them in markdown format. I have added this feature in this pull request.
- It is configurable using config.ini file to activate or deactivate this feature in the instance. It is disabled by default please enable it for testing in config.ini (
allow_upload_media = true) - Size of the files can be limited using
media_max_size, please setmedia_max_sizein config.ini before running. Its unit is megabyte, for example 10 megabytes:
media_max_size = 10
- The uploaded media can be shared using markdown for example:
, also the list of uploaded files is there.
- The front-end part needs more improvements.
- Total space can be limited using
total_media_space, its unit is megabyte(s).
- [x] I have signed the CLA
This is such a huge feature. Can we expedite reviewing this and getting this merged?
Could you please review this pull request?
Thanks for submitting this. This is a pretty huge feature with many repercussions for the product, so this will need to be pretty solid before we can merge. I'll leave comments in the code as well, but here are some important things that need to be addressed:
- Media metadata should probably be stored in the database, to help with management and permissions. Note that we've done a ton of work on this with our Write.as instance and Snap.as (using this table schema), and we could build on this if you want to collaborate on this instead of writing from scratch.
- We'll need accompanying documentation in https://github.com/writefreely/documentation to ensure people configure any reverse proxy to also allow large file uploads (e.g. most servers are configured for <10MB by default)
- Please run
go fmton all files, per the Code Guidelines
Again if you'd like to work on this together, another way forward would be for you to work only on the UI for this -- uploading images and managing them -- and then I could contribute the backend work that we've already put in. Either way, let me know what you'd like to do.
- "Media metadata should probably be stored in the database, to help with management and permissions." : I tried to to do something like inheriting permissions of a post for its files.
- "...another way forward would be for you to work only on the UI for this -- uploading images and managing them...": Would you address me in source codes, I didn't see about uploading images. My purpose is uploading all kind of files not only the images.
Any news on this? My users keep bugging me that they want this :)
Cheers, y'all!
Any news on this? My users keep bugging me that they want this :)
Cheers, y'all!
I too would like to get a status update about this