Skip to content

feat: support exif autoOrient from base64encoded payloads#633

Open
eortiz-tracktik wants to merge 1 commit into
aws-solutions:mainfrom
TrackTik:autoOrient-exif
Open

feat: support exif autoOrient from base64encoded payloads#633
eortiz-tracktik wants to merge 1 commit into
aws-solutions:mainfrom
TrackTik:autoOrient-exif

Conversation

@eortiz-tracktik

Copy link
Copy Markdown

Issue #, if available:
#606
#623

Description of changes:
Code makes autoOrient() unreachable via a base64encoded/JSON payload.

Here is the breakdown of the issue:

  • The JSON Limitation: The JSON.parse() method (and the JSON standard) cannot produce a value of undefined.

    • If you send {"rotate": null}, then edits.rotate is null.
    • If you send {"rotate": 0}, then edits.rotate is 0.
  • The Condition (edits.rotate === undefined):

    • Since you must provide the key for the loop to enter the case, edits.rotate will always have a value (like null).
      null === undefined is false.

Checklist

  • 👋 I have added unit tests for all code changes.
  • 👋 I have run the unit tests, and all unit tests have passed.
  • ⚠️ This pull request might incur a breaking change.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Service code that makes autoOrient() unreachable via a JSON payload.

Here is the breakdown of the issue:
    The JSON Limitation: The JSON.parse() method (and the JSON standard) cannot produce a value of undefined.
        If you send {"rotate": null}, then edits.rotate is null.
        If you send {"rotate": 0}, then edits.rotate is 0.
    The Condition (edits.rotate === undefined):
        Since you must provide the key for the loop to enter the case, edits.rotate will always have a value (like null).
        null === undefined is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant