Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use If-None-Match header when saving a file #146

Open
NSeydoux opened this issue Jun 16, 2020 · 1 comment
Open

Use If-None-Match header when saving a file #146

NSeydoux opened this issue Jun 16, 2020 · 1 comment
Labels
enhancement New feature request Triaged This means that we've a ticket to look at this in the future

Comments

@NSeydoux
Copy link
Contributor

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 nodeSolidServer/node-solid-server#1431.

@Vinnl
Copy link
Contributor

Vinnl commented Jun 16, 2020

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).

I'd set it to false by default to avoid unintended data loss, and simply make overwriteFile a wrapper that sets it to true during its deprecation period.

@Vinnl Vinnl added the enhancement New feature request label Jun 17, 2020
@ThisIsMissEm ThisIsMissEm added the Triaged This means that we've a ticket to look at this in the future label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request Triaged This means that we've a ticket to look at this in the future
Projects
None yet
Development

No branches or pull requests

3 participants