• Hey Guest, don't forget to VOTE on each RFC topic. Your voting determine Chevereto development! No votes, no development.
  • Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

datefolders option of creation date rather than current date

jukebox

Chevereto Member
Hi,

The date folders structure works well, but the current structure is limited to the current/upload date:
$datefolder = date('Y/m/d/');

Would it be possible to use the creation date of the image? Creation date can be taken from EXIF data:
  • DateTimeOriginal
  • DateAcquired
  • FileModifyDate
or could be taken from the file system:
  • filemtime
  • filectime
This would allow for photographs to be stored in a more chronological order.

Image can be uploaded into temp directory for processing, and then new datefolder can be set after reading from image? (or something similar)

Please consider this feature request.

Thanks
 
Yes, it sounds nice but not practical. Photos are ordered by date uploaded and if you start to use file exif creation date you will end up with issues everywhere.

I keep thinking how to implement it without causing issues and sadly I can't think how to achieve it.
 
Hi Rodolfo,

I think that your codebase and data architecture could handle this quite easily.

In class.image.php: uploadToWebsite
Code:
$datefolder = date('Y/m/d/'); //This date to be replaced

In class.image.php: insert
Code:
$populate_values = [
                                'date'                          =>  G\datetime(),   //This date to be replaced
                                'date_gmt'                      => G\datetimegmt(),  //This date to be replaced

It works when the filesystem structure and the database (image_date, image_date_gmt) match.

Things to consider:
1) what happens if the file does not have EXIF data? (EXIF does not exist, or filetype is GIF)?
  • How does the file get uploaded to the temp directory?
  • Is there a way that the filesystem creation/modification timestamp can be preserved? (Note: if you are creating a new temp file, the timestamp will be current)
2) Seems to be other functions of "reservation" and "flooding" that use timestamps - would they be impacted?
 
Since Chevereto binds upload date <=> datefolder, hack this date means that you hack the upload date breaking a lot of stuff. The implementation of this feature isn't in just three lines of code.

I understand that your goal is that uploads shows a /2012/01/20/file.jpg (Exif cdate) structure instead of /2016/04/09/file.jpg (upload date), to achieve that a new column must be added filling it with the image creation date, add a case for those image without Exif date, change the date listings to ID, etc.

Honestly is a nice addon, I will add it but not for V3.
 
Just to add my +1 for this feature.

I'm personally using Chevereto as a way to host my personal images, and easily share with family. Having all the pictures dumped into one folder (the date which I upload them all) isn't exactly practical.

Has anybody had any success of moving pictures to dated folders, and then adjusting the file links in the database?

Ta,

Luke.
 
Hi Rodolfo - just checking in with this feature request? Has any other V3 development meant this may be done sooner than V4?

Thanks.
 
Back
Top