Skip to content

extract lastModified property from zip entries #462

Answered by gildas-lormeau
bwkam asked this question in Q&A
Discussion options

You must be logged in to vote

The last modification date is accessible via the Entry#lastModDate property. See the example below.

<!doctype html>
<html>

<head>
  <title>Display last modification dates of entries in a zip file</title>
  <style>
    table {
      margin-block-start: 8px;
      border-collapse: collapse;
    }
    td {
      border: 1px dotted grey;
      padding: 4px;
    }
  </style>
</head>

<body>
  <form>
    <input type=file id=zipFileInput>
  </form>
  <div id=result>
  </div>
  <script type=module>

import { ZipReader, BlobReader } from "https://unpkg.com/@zip.js/zip.js/index.js";

zipFileInput.onchange = () => display().catch(error => alert(error));

async function display() {
  const zipReader = 

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@bwkam
Comment options

@gildas-lormeau
Comment options

@bwkam
Comment options

@gildas-lormeau
Comment options

@bwkam
Comment options

Answer selected by bwkam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #461 on November 11, 2023 17:15.