Skip to content

[Feature] Passing of fileinfo as algoCustomDataΒ #643

@Abrom8

Description

@Abrom8

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: FeatureA new feature to implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions