Skip to content

Implement Skynet directory default path

Ivaylo Novakov requested to merge ivo/default_path into master

MERGE REQUEST

MR Guidelines

Overview

This MR adds a defaultPath metadata entry to siafiles.

It also adds support for a redirect query parameter that disables the redirect to the defaultPath when set to true.
The use case for redirect=false is for all the cases in which you'd want to interact with the entirety of the Skyfile, for example when you want to download the entire directory contained in it by passing the format=tar parameter. Adding a separate flag is easier to maintain than making sure that we think of this when implementing other parameters, potentially years in the future.

Note

I haven't updated the API docs and the changelog, yet. I will.

Example for Visual Changes

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods or updated methods have clear docstrings
  • Testing added or updated for new methods
  • [ ] Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • [ ] Module README.md updated for changes to workflow
  • [ ] Issue added to Sia-UI repo for new supporting features
  • Changelog File Created

Issues Closed

Closes #4202 (closed)

Edited by Ivaylo Novakov

Merge request reports