Query for recently uploaded / attached files


(Mirko) #1

I am wondering if there is possibility to view posts with uploaded / attached files.


(Jeff Atwood) #2

This might be possible with a Data Explorer query @techAPJ?


(Arpit Jalan) #3

Yes. Here is a data-explorer query for that:

SELECT posts.id AS post_id,
       uploads.url
FROM post_uploads
JOIN uploads ON uploads.id = post_uploads.upload_id
JOIN posts ON posts.id = post_uploads.post_id
ORDER BY posts.created_at DESC

@Miro Install discourse-data-explorer plugin and import this query:

post-with-uploads.dcquery.json (312 Bytes)


(Mirko) #4

Thanks,
That looks as for the admin. I thought more for forum users so they can check what are the latest uploaded files.


(Jeff Atwood) #5

No such feature exists or is planned.


(Mirko) #6

Ok, thanks, I can do it other way.