We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do i get a file last modified date instead of upload date? Or add file-manager fields?

How Do I?

Mike K's avatar
Mike K
5 posts
4 years ago
Mike K's avatar Mike K

I’d call this a bug, but it might be intentional. I just synced a bunch of files using file manager. I’m on ee5.3.2. Displaying them in a template, it seems that upload_date is being used instead of the actual file modified date (using the modified_date filed of the file entry).

  1. Is there a config override that will change this behavior?
  2. Does anyone know where in the ee codebase this is controlled?
  3. Can one add fields to the file manager?

I don’t really want to write a big SQL to correct this - much more comfortable with modifying the code if i can find it. I’m also REALLY trying to avoid having to wrap all these file entries in channel entries just to get data I need.

Any help appreciated. Mike

       
Mike K's avatar
Mike K
5 posts
4 years ago
Mike K's avatar Mike K

Just looked at the exp_files table, and there are separate upload_date and modified_date fields, but they hold identical values. I’m guessing the modified_date is the modified date of the file record instead of the file itself (ugh).

mike

       
Mike K's avatar
Mike K
5 posts
4 years ago
Mike K's avatar Mike K

Well, I think I’ve narrowed this down.

The first group I of files I tried, I forgot to preserve timestamps when copying the files into their site folder. So I ran sync before realizing that, then again after I re-copied the files with timestamps preserved.

Then (after writing the OP) I ran a second group of files that I made sure to copy over with preserved timestamps. After syncing that dir, it displays fine with the actual modified dates.

My conclusion is that changing a file’s modified date and re-syncing will not trigger ee to update that file’s record. So, bug not feature (?).

Mike

       
Mike K's avatar
Mike K
5 posts
4 years ago
Mike K's avatar Mike K

I just deleted/recreated the dirs and resync’ed. Now fine. Mike

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.