community-platform
community-platform copied to clipboard
[feature request] Add file download to research
Is your feature request related to a problem? Please describe. We can't add files to research topics to download. (besides an external link)
Describe the solution you'd like Would be nice to be able to upload files to a research, like we made in how-to's. https://github.com/ONEARMY/community-platform/pull/1664 This keeps track of the downloads and makes sure the file stays online. The button can be added per step
Describe alternatives you've considered Continue using Gdrive to store files.
What it would look like

Features:
- [ ] Add the option to upload files/links in a research update
- [ ] Add the counter for downloads for files in updates
- [ ] Refactor and implement firebase incrementation functions
The logic for incrementing howto download count can be seen here, and is incorporated into the HowtoDescription through a handleClick method that is passed to the DownloadFiles component.
The more I think about this, the more I realize that I first introduced this for HowTo's so maybe it's best I take this on since I've been meaning to refactor the whole process and introduce incrementation using the firebase increment functionality. This whole process has to be cleaned up and I've been putting it off for a while... 🥲
Thanks for the extra info @AlfonsoGhislieri Feel free to take it on of you want. But only do if you have the capacity for it, since you mentioned things will get more busy on your end 🙃
I don't think it should take too long, will keep you updated if I can't get this done!
@davehakkens there is no way to currently add a download link directly when creating/editing like there is for a Howto. I assume right now this is done just by adding a link in the description? We would need to include the option to upload files/links to the form, is this the approach you wanted?
Yes indeed the method would be the same as for how-tos. File upload in the form. (It could also copy the same functionality as how-to that adds the possibility to use an external link. To keep things coherent, and track downloads. But not sure if this would be an additional issue for later.) sorry for not making this more clear in the original issue

This really does continue to highlight what you said @thisislawatts, we really need to combine both of these into one. It's really not efficient and sustainable to keep having to change both separately. Worth discussing again at the next maintainer call, I do think it should be something to prioritize moving forward and it will save lots of future developing efforts.
Right so @davehakkens now that all the issues should have been solved with the HowTo file downloads hopefully, this brings me back to this. Considering a lot of the work done in #2245 is now stale and needing to be reworked to match the changes made with the HowTo. I was thinking of scrapping this old PR and starting new, breaking it down like this:
- Add the option to upload files/links in a research update
- Add the counter for downloads for files in updates (is this something we actually want to have though?)
- Add files to research description (here I am also not sure we actually wanted this functionality right?)
- Refactor and implement firebase incrementation functions if we include 2 and 3
Let me know!
- Thats sounds good to me.
- Yes download stats would be very nice. Where each upload has its own count
- Dont think it will be really needed but wouldnt hurt to for consistency. (but might not be worth it for maintaince?)
- This I don't know (:
Note: I mainly look at this from a user perspective, for that upload/download per step is most clear However i'm not sure if this goes against the potential future plan of aligning the datasets of how-to and research.
Alright so I think then for now let's stick to adding it to the research updates with each having it's only download stats :-) I'll update the tasks!
@AlfonsoGhislieri want to stay assigned to this or shall I put it back to the main pool for anyone to pick up?
@iSCJT yes I’m slowly working back through this, a lot changed so I had to restart
Hello everyone, going to start working on this feature.
:tada: This issue has been resolved in version 1.88.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: