inrupt / inrupt/solid-client-js

Use `If-None-Match` header when saving a file

Open
#146 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Triaged
Dominant language
TypeScript
Stars
245
Forks
42
Avg merge
12h 49m
Merged PRs (30d)
22

Description

Currently, unstable_overwriteFile(fileUrl: RequestInfo, file: Blob, options explicitly overwrites any data at the provided URL. A more subtle behaviour would be to change it to unstable_saveFile(fileUrl: RequestInfo, file: Blob, options), with options including a parameter overwrite: boolean set to true by default (to be consistent with the default behaviour of unstable_overwriteFile that would be replaced by unstable_saveFile).

Under the cover, the library would set the If-None-Match header for the server to check if a resource already exists at the provided URL.

This feature should coordinate with https://github.com/solid/node-solid-server/issues/1431.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the unstable_overwriteFile API described in the issue and trace how save requests are assembled. Review the coordinated node-solid-server issue, then define the replacement API and If-None-Match behavior, including the default overwrite option; done means the client and server coordination is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.