Skip to content

v1.5.0

Latest

Choose a tag to compare

@Fermionic-Lyu Fermionic-Lyu released this 21 Jul 04:20
76d29b6

Storage: standard PUT create-or-replace semantics

Storage uploads now follow standard object-storage PUT semantics, paired with the InsForge backend change in InsForge/InsForge#1760.

Changed behavior

  • upload(path, file) — uploading to a key that already exists now replaces the object in place. Previously the server silently auto-renamed the key (photo.pngphoto (1).png). The method signature is unchanged.
  • uploadAuto(file) — now generates a unique, collision-free key client-side (sanitized base + timestamp + random) and uploads through the standard path, so repeated uploads of the same file never overwrite each other.

Notes

  • This is a runtime behavior change, not an API break — existing code compiles and runs unchanged. Only the outcome of uploading to an already-used key differs.
  • Requires an InsForge backend that includes the standard-PUT storage change (InsForge/InsForge#1760). Do not run against a pre-change backend.
  • The friendly auto-rename UX now lives in the InsForge dashboard client rather than the API.