{"record":{"id":"927874992a418481","repo":"microsoft/aspire","slug":"submitted-files-for-input-inputname-do-not-match-the","errorCode":null,"errorMessage":"Submitted files for input '{inputName}' do not match the completed uploads.","messagePattern":"Submitted files for input '(.+?)' do not match the completed uploads\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting/Dashboard/InteractionFileUploadStore.cs","lineNumber":158,"sourceCode":"                {\n                    files.Add(new InteractionFileUpload(fileId, entry.OriginalFileName, entry.TempFile.Path));\n                }\n            }\n        }\n\n        return files;\n    }\n\n    /// <summary>\n    /// Marks validated uploads as accepted into the interaction result.\n    /// </summary>\n    public void MarkFilesAccepted(int interactionId, string inputName, IReadOnlyList<string> fileIds)\n    {\n        foreach (var fileId in fileIds)\n        {\n            if (!TryGetEntry(interactionId, fileId, out var entry))\n            {\n                throw CreateFileMismatchException(inputName);\n            }\n\n            lock (entry)\n            {\n                if (entry.State is not (FileEntryState.Uploaded or FileEntryState.Accepted) ||\n                    !string.Equals(entry.InputName, inputName, StringComparisons.InteractionInputName))\n                {\n                    throw CreateFileMismatchException(inputName);\n                }\n\n                entry.State = FileEntryState.Accepted;\n            }\n        }\n    }\n\n    /// <summary>\n    /// Removes a file entry and deletes the associated file on disk.\n    /// </summary>","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting/Dashboard/InteractionFileUploadStore.cs#L140-L176","documentation":"When the dashboard marks uploaded files as accepted for an interaction input, every submitted file ID must exist in the upload store for that interaction. A file ID that is unknown to the store means the submitted file set does not match what was actually uploaded, so validation fails.","triggerScenarios":"Calling MarkFilesAccepted (via ResolveValidateAndMarkFiles from the dashboard submission path) with a fileIds list containing an ID that was never registered for that interactionId.","commonSituations":"Stale/duplicated client state resubmitting old file IDs, IDs from a different interaction, page refresh causing the client to resend identifiers whose store entries were cleared.","solutions":["Have the client re-upload the files and submit only the file IDs returned by the current upload flow","Verify the interactionId matches the one under which the files were uploaded","Clear client-side cached file references after each interaction completes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// client-side: only submit IDs obtained from the upload API of the same interaction\nif (!uploadedIds.every(id => currentInteractionUploadIds.has(id))) await reuploadFiles();","typeGuard":null,"tryCatchPattern":"try { await submitFiles(interactionId, inputName, fileIds); } catch (FileMismatchException) { await reuploadFiles(); }","preventionTips":["Clear cached file IDs after each interaction completes","Never reuse file IDs across interactions or page loads","Re-upload rather than resubmit when in doubt"],"tags":["dashboard","file-upload","validation","interaction"],"backgroundTag":"resource-not-found","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}