Add a flag to limit the size of skyfile metadata returned
Overview
- Add a flag that removes the
subfiles
from the metadata of the downloaded skyfile. - Add a
skyfile/<skylink>/metadata
endpoint that returns the full metadata of the skylink.
Design or Proposal
If a skyfile has too many subfiles, it's metadata becomes too large to fit into the headers.
The agreed (on Discord) solution to that is to add a flag that limits the size of the headers, either by completely dropping the metadata or by limiting its size. Dropping the subfiles
field itself is going to guarantee that we never run into this problem again (unless we add other huge field, ofc.). In addition to that, we need to provide an endpoint where users can download the metadata of such files in a reliable way, i.e. not via the headers. Such an endpoint can be /skyfile/<skylink>/metadata
.
Original issue that surfaced the problem: https://github.com/NebulousLabs/skynet-webportal/issues/503
Edited by Ivaylo Novakov