mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Add application to Resource.
This commit is contained in:
@ -128,6 +128,20 @@ class ResourceListPage extends React.Component {
|
||||
width: '80px',
|
||||
sorter: (a, b) => a.tag.localeCompare(b.tag),
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:Application"),
|
||||
dataIndex: 'application',
|
||||
key: 'application',
|
||||
width: '80px',
|
||||
sorter: (a, b) => a.application.localeCompare(b.application),
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Link to={`/applications/${text}`}>
|
||||
{text}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:Parent"),
|
||||
dataIndex: 'parent',
|
||||
|
@ -56,9 +56,10 @@ export function deleteResource(resource, provider="") {
|
||||
}
|
||||
|
||||
export function uploadResource(owner, tag, parent, fullFilePath, file, provider="") {
|
||||
const application = "app-built-in";
|
||||
let formData = new FormData();
|
||||
formData.append("file", file);
|
||||
return fetch(`${Setting.ServerUrl}/api/upload-resource?owner=${owner}&tag=${tag}&parent=${parent}&fullFilePath=${encodeURIComponent(fullFilePath)}&provider=${provider}`, {
|
||||
return fetch(`${Setting.ServerUrl}/api/upload-resource?owner=${owner}&application=${application}&tag=${tag}&parent=${parent}&fullFilePath=${encodeURIComponent(fullFilePath)}&provider=${provider}`, {
|
||||
body: formData,
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
|
Reference in New Issue
Block a user