diff --git a/src/group/components/GroupSharedDataUpload.js b/src/group/components/GroupSharedDataUpload.js
index 29e78d8e86..baff961906 100644
--- a/src/group/components/GroupSharedDataUpload.js
+++ b/src/group/components/GroupSharedDataUpload.js
@@ -79,9 +79,12 @@ const GroupSharedDataUpload = () => {
-
+
diff --git a/src/group/components/GroupSharedDataUploadFiles.test.js b/src/group/components/GroupSharedDataUploadFiles.test.js
index da4338ad90..9e408f23f5 100644
--- a/src/group/components/GroupSharedDataUploadFiles.test.js
+++ b/src/group/components/GroupSharedDataUploadFiles.test.js
@@ -215,6 +215,10 @@ test('GroupSharedDataUpload: Complete Success', async () => {
await waitFor(() => expect(uploadButton).not.toHaveAttribute('disabled'));
await act(async () => fireEvent.click(uploadButton));
expect(navigate.mock.calls[0]).toEqual(['/groups/slug-1']);
+
+ const saveCall = terrasoApi.request.mock.calls[0];
+ expect(saveCall[0].body.get('target_type')).toBe('group');
+ expect(saveCall[0].body.get('target_slug')).toBe('slug-1');
});
test('GroupSharedDataUpload: PDF Success', async () => {
diff --git a/src/landscape/components/LandscapeSharedDataUpload.js b/src/landscape/components/LandscapeSharedDataUpload.js
index f1f949230a..8188185ade 100644
--- a/src/landscape/components/LandscapeSharedDataUpload.js
+++ b/src/landscape/components/LandscapeSharedDataUpload.js
@@ -85,9 +85,8 @@ const LandscapeSharedDataUpload = () => {
name: landscape.name,
})}
/>
-
+
{
const path = '/shared-data/upload/';
const body = new FormData();
const filename = `${file.name}${file.resourceType}`;
- if (groupSlug) {
- body.append('groups', groupSlug);
- }
- if (landscapeSlug) {
- body.append('landscapes', landscapeSlug);
- }
+ body.append('target_type', targetType);
+ body.append('target_slug', targetSlug);
body.append('name', file.name);
if (file.description) {
body.append('description', file.description);