Closed josephmturner closed 1 year ago
It should be possible to do a HEAD
request and get all the metadata about a path without actually downloading it.
Is there data that's missing from there?
Great! Would you like me to add a section to the README describing that functionality?
Will do!
Thank you!
You can get the version for a drive or file in the ETag
header. Some files (not all) will also have a Last-Modified
header based on the mtime of the file.
Unless there are other fields that are needed this might be enough?
It looks like one way to set metadata.mtime
when updating a file with a PUT
request to hypercore-fetch is to use a FormData
body. Is it possible to set metadata.mtime
when updating a file with a PUT
request without using a FormData
body?
It should be getting set in both situations. If it isn't it's a bug. I'll fix it.
Fixed! Gonna push to hyper-gateway soon
Is it possible to get information about a Hyperdrive path (to a file or a directory) without downloading its contents? I am interested in ctime, mtime, x-blocks, x-blocks-downloaded. This information could be quickly loaded to give the user a more complete view of a directory beyond just the names of its contents.
I this idea makes sense, maybe an interface could look like
fetch('hyper://NAME/example/?stat', {method: 'GET'})