←back to thread

669 points danso | 1 comments | | HN request time: 0.203s | source
Show context
crazygringo ◴[] No.23260987[source]
I thought iOS was supposed to convert HEIC images to JPEG automatically behind-the-scenes in any file transfer situation where HEIC isn't supported. The article itself even says:

> iPhones convert HEICs to JPEGs automatically when they’re attached to emails in the Mail app

I'm just curious technically why the same didn't happen with the testing portal? If you have a webpage that accepts image uploads, is iOS Safari not smart enough to do the same conversion?

Or was the portal programmed badly or in a non-standard way that that couldn't happen? Or is there a way to do it that the developers ignored?

Just curious for the technical details of who's more to blame here -- Apple not providing enough backwards compatibility, or the testing portal being designed poorly.

Because blaming students for not following obscure instructions to change their phone's overall configuration is not the right path. A national testing portal ought to support the default image format taken by the world's most popular phone, period.

replies(10): >>23261070 #>>23261216 #>>23261225 #>>23261243 #>>23261256 #>>23261511 #>>23261741 #>>23262179 #>>23262549 #>>23264304 #
oefrha ◴[] No.23261216[source]
Tried a standard input tag with the proper accept attribute

  <input type="file" accept="image/jpeg,image/png" />
Selected a HEIC file from Photos in Safari, the selected image was automatically converted to JPEG.

Ten bucks says College Board programmer(s) failed to do the most basic and standard filtering.

Edit: Like a sibling comment said, the accept attribute actually isn't necessary; even PNG images (e.g. screenshots) from Photos are converted to JPEG automatically. This is true on both macOS and iOS Safari (latest). To be clear, on macOS you need to select from Photos instead of the filesystem for this to take effect.

In case anyone's interested, source code you can use to test for yourself (a Flask app):

app.py:

  import flask
  
  
  app = flask.Flask(__name__)
  
  
  @app.route("/", methods=["GET", "POST"])
  def index():
      if flask.request.method == "POST":
          image = flask.request.files["image"]
          return f"uploaded {image.filename!r} ({image.mimetype})"
      return flask.render_template("index.html")
templates/index.html:

  <html>
    <head>
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
    <body>
      <form method="post" enctype="multipart/form-data">
        <input name="image" type="file" required />
        <input type="submit" />
      </form>
    </body>
  </html>
replies(5): >>23261508 #>>23261519 #>>23261524 #>>23262200 #>>23262967 #
oefrha ◴[] No.23262967[source]
Turns out I overlooked some details in the article. Some students (after the issue was known) airdropped photos to their computers and attempted to rename .heic to .png/.jpeg to bypass the extension check (who would have guessed extensions don't have to correspond to file types), they went through but were rejected a day later. The article isn't clear on what exactly was happening before, but I suppose students were trying to submit airdropped .heic directly?

In any case, sounds like absolutely horrid QA and communications of what's accepted (and of course, very bad idea not supporting the format in the first place when half your test takers are taking pictures in that format).

(A bit more context on my original comment: I thought they had some working system where test takers could upload photos directly from their phones — e.g., scan a QR code to open a page with a unique ID with an image upload form. Turns out that's too much to ask; their process is "get the image from your camera to your test-taking device whichever way you can think of, not our problem." Not surprisingly that's not a very foolproof process.)

replies(1): >>23264735 #
1. frei ◴[] No.23264735[source]
If they were submitted in time, but then rejected a day later, it seems like those cases can be resolved by some manual work by collegeboard to convert them