Repository navigation
fix: upload signatures through the uploadUri link - #163
Merged
Merged
Conversation
A signature is a SignatureDataEntity, not an AttachmentDataEntity, so the upload ignored the uploadUri link of its field and never wrote the url the server assigned back into the signature. With a uploadUri link on the form, the file went to the server location while the submitted signature pointed at the url the client had generated, where no file exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A signature is a
SignatureDataEntity, not anAttachmentDataEntity.ApptiveGridClientonly looked atAttachmentDataEntitywhen ituploadUrilink of the field an attachment belongs to (_uploadUriLink), and_applyAttachmentReplacements).So when a form offers a
uploadUrilink, the signature file was uploaded to the location the server assigned, while the submitted signature still pointed at the url the client had generated increateAttachment, where no file exists. AuploadUrilink on the signature field itself was ignored.Fix
_uploadUriLinkalso matches aSignatureDataEntitythat holds the attachment, so the field link is preferred over the form link as for attachment fields._applyAttachmentReplacementsalso replaces the value of aSignatureDataEntity.Tests
Three new tests in
test/api_client_upload_uri_test.dart:dart analyze --fatal-infosis clean, all tests pass, and no line ofapptive_grid_client.dartis uncovered.Not in this PR
The upload target stays requested with
{'type': 'public'}for every attachment, signatures included. That is intended.🤖 Generated with Claude Code