Skip to content
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

Missing metadata when uploading a file #15

Open
AleixMT opened this issue Nov 16, 2022 · 2 comments
Open

Missing metadata when uploading a file #15

AleixMT opened this issue Nov 16, 2022 · 2 comments

Comments

@AleixMT
Copy link
Contributor

AleixMT commented Nov 16, 2022

Hello,

When I upload a file I would like to also include the metadata of that file but the method uploadFile only accepts the file and the DOI of the dataset where we are going to upload it.

This is an example of a file and its metadata:
image

I would like to know how to upload the Description and the File Path property, but when I am looking into the implementation I see that you are using the class Deposit from the SWORD library, which contains fields for a file, a date, a MD5, a mimetype... But I do not see the path or description anywhere.

Could you please explain me how can I upload those metadata (Description and File Path) into each file? The metadata of the name is already an extra parameter of uploadFile method in my PR #13, which allows to separate the data of the file from its metadata (File Name), so the File Name is already a metadata that we can control separately from the data.

I am looking for a similar modification / extension that allow me to control those fields via uploading the file or via modifying its metadata using another API method.

@otter606
Copy link
Contributor

would the 'add metadata' function described in the API docs be what you need?
https://guides.dataverse.org/en/latest/api/native-api.html

@AleixMT
Copy link
Contributor Author

AleixMT commented Nov 19, 2022

As far as I know, in part, yes. I think I can use this function to add the metadata that I need.

But also I will also need to use the get metadata function to retrieve the data if it is already created, and the update metadata to update metadata if it is in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants