Handle server API differences in file response fields#40
Open
rdenham wants to merge 2 commits into
Open
Conversation
Some FileSender servers (observed on AARNet's instance) return numeric fields as strings and use 'puid' instead of 'uid' as the per-file upload key. Cast size to int before arithmetic and resolve the key field from whichever of uid/puid is present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
I've also changed the download file, so all the encryption fields are optional. Actually, it should be noted that encryption doesn't work with this package, so you won't be able to download encrypted files anyway. I don't use encryption, so I think it is still worth fixing so that we can upload/download unencrypted files. |
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.
as puid rather than uid. Added a helper that resolves whichever field is present, with a clear error if neither is
found.
two arithmetic sites where this caused a TypeError.