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

[Feature] Passing of fileinfo as algoCustomData #643

Open
Abrom8 opened this issue Dec 12, 2024 · 0 comments
Open

[Feature] Passing of fileinfo as algoCustomData #643

Abrom8 opened this issue Dec 12, 2024 · 0 comments
Labels
Type: Feature A new feature to implement

Comments

@Abrom8
Copy link
Contributor

Abrom8 commented Dec 12, 2024

Motivation / Problem

Some c2d algorithms need infos about the filetype for working propoerly.

Solution

Call the /fileinfo endpoint of the provider (https://docs.oceanprotocol.com/developers/old-infrastructure/provider/general-endpoints#file-info) and fill the algocustomdata automatically for every compute job with the fileInfo.

The idea is the split the filename and only pass the fileExtension.

Example fileinfo response:

[
    {
        "contentLength": "495331",
        "contentType": "application/json",
        "filename": "ptw-pt_1699348564105_901_copyof652.json",
        "index": 0,
        "type": "url",
        "valid": true
    }
]

Expected algocustomdata structure:

{
  fileinfo: {
    contentLength: "495331",
    contentType: "application/json",
    fileExtension: "json"
  }
  ...otherAlgoCustomData
}
@Abrom8 Abrom8 added the Type: Feature A new feature to implement label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature A new feature to implement
Projects
None yet
Development

No branches or pull requests

1 participant