Direct-to-S3 / Azure tus 1.0 resume IndexedDB Golden Retriever 30 locales Webcam & screen capture

Instant Upload (Dedupe)

With instantUpload: true the client computes the file's SHA-256 before transferring and probes GET /api/upload/exists. When the server confirms it already stores that exact content (it hashes every stored upload itself - client-claimed hashes are never trusted), the task completes with the existing file's id and zero bytes are transferred. Requires EnableInstantUpload = true on the server; without it the probe 404s and uploads proceed normally.

What you should see: upload a file normally the first time, then add the same file again - the second attempt flashes to completed instantly and the log shows instant: deduped against existing file with no upload request in the network panel.
Log
  • Nothing yet - add a file, then add the same file again.
// Server (Program.cs)
builder.Services.AddCoreUpload(options =>
{
    options.EnableInstantUpload = true;   // hash stored uploads + expose GET /exists
});

// Client
CoreUpload.create('#uploader', {
    uploadUrl: '/api/upload/upload',
    instantUpload: true,
    onInstantUpload: function (task, result) {
        console.log(task.fileName + ' deduped -> ' + result.fileGuid);
    }
});

Security note: the probe reveals whether a given content hash exists on the server, so the feature is off by default. Enable it only where that is acceptable, or scope the endpoint group with your own authorization.