Are there any potential workarounds or solutions to retrieve the original date of a file during upload in PHP?

When uploading a file in PHP, the original creation date of the file is not preserved by default. One potential workaround is to store the original creation date in a separate field or database table when the file is uploaded. This way, you can retrieve and display the original creation date when needed.

<?php
// Get the original creation date of the file
$originalCreationDate = date("Y-m-d H:i:s", filectime($_FILES["file"]["tmp_name"]));

// Save the file and original creation date to the server
move_uploaded_file($_FILES["file"]["tmp_name"], "uploads/" . $_FILES["file"]["name"]);
// Store the original creation date in a separate field or database table

// Retrieve the original creation date when needed
echo "Original Creation Date: " . $originalCreationDate;
?>