-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add attachments retrieval #95
Comments
It could be! Interested in contributing it? |
Yes I would. Currently I'm using a dirty regex to get the attachment url form the post HTML an then send the request manually by callig "_get". Would you have any advice or a reference for how to retrieve them more cleanly? |
No idea! And there doesn't seem to be any support for this in the official Ruby API client. That being said, I'd be less shy about using regex. The Discourse app itself uses a CSS selector to identify attachments from posts! A method returning a list of attachments from an individual post sounds useful; wouldn't worry too much if it uses regex if it works. |
There are several ways to upload files documented in the API docs (https://docs.discourse.org/#tag/Uploadshttps://docs.discourse.org/#tag/Uploads) but I don't see anything about specifically listing uploads. Weird! I searched for a while on https://meta.discourse.org/ and didn't find anything there either, so it really looks like pulling data out via regex is the "supported" way. |
Got it, that's very weird. I'm working on it! |
I wanted to push a branch but I got permission denied |
You need to use the "fork" button on GitHub to create a copy then clone that copy to your computer. |
I did push one, open to review and suggestions |
I've added a review - thanks for your submission! |
Hi all.
Just started working with this library and I noticed that there is no functionality to retrieve attachments from posts, or upload one. Is it on the roadmap?
The text was updated successfully, but these errors were encountered: