Mattermost-server: Allow searching for files through plugin API

Created on 9 Oct 2019  路  3Comments  路  Source: mattermost/mattermost-server

Doesn't look like we expose an api to allow searching for files programmatically. As per discussion
https://community.mattermost.com/core/pl/7rxgk5rajtb67p161uw38xmw6o and
https://community.mattermost.com/core/pl/qoxcxnmurff9mkfx98gct4ct5e. It makes sense to expose a plugin api for searching files.

models.GetFilesOptions {
    // UserIds optionally limits the files to those created by the given users.
    UserIds []string
    // ChannelIds optionally limits the files to those created in the given channels.
    ChannelIds []string
    // Since optionally limits files to those created after a specified time as Unix time in milliseconds
    Since int64
    // IncludeDeleted includes deleted files if set.
    IncludeDeleted bool
    // Page limits to the requested page of results.
    Page int
    // PerPage limits the number of results to fetch per page.
    PerPage int
    // SortBy optionally sorts the files by this field.
    SortBy:         models.CHANNEL_SORT_BY_CREATED, // "CreateAt"
    // SortDirection sorts the files in a particular order, default is ASCENDING.
    SortDirection:  models.CHANNEL_SORT_ASCENDING,
}
GetFiles(*model.GetFilesOptions) ([]*model.FileInfo,聽*model.AppError)

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-17912

AreToolkit Medium Help Wanted PR Exists TecGo

Most helpful comment

@jasonblais I'll take this one

All 3 comments

I will take it up. Can you please assign this to me.

Opening up for grabs

@jasonblais I'll take this one

Was this page helpful?
0 / 5 - 0 ratings