Stored Signature File naming convention changed from D7 to D10+

Created on 26 August 2024, 3 months ago
Updated 29 August 2024, 3 months ago

Problem/Motivation

The Issue Add ability to store the signature in a PNG file instead of Data URI in the database Add ability to store the signature in a PNG file instead of Data URI in the database Fixed added functionality that previously existed in the D7 version of this module. However, the associated commit changed how files are named compared to D7 and the patch related to the Issue.

In D7 and signaturefield-3292083-7.patch the files are named using time(). In the current version, a random string is used.

Personally, I prefer using time() as at least it provides some context to the file name. It also provides consistency between the various versions of this module.

I will submit a patch to revert to the old style. If you are not a fan of this, can we at least consider separating it into its own method to at least make it easier to override?

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇨🇦Canada tame4tex

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @tame4tex
  • Assigned to tame4tex
  • 🇨🇦Canada tame4tex

    I have created MR with the requested change

  • Status changed to Needs work 3 months ago
  • 🇧🇪Belgium matthijs

    I personally prefer the current approach, what are the benefits of using a timestamp?

    Would it be a good idea to make this configurable? I'm thinking of a textfield in the field settings where you can specify the filename (format) using tokens. This adds some flexibility, but it might also be overkill?

  • 🇨🇦Canada tame4tex

    In our usage it provides some helpful context as to when the signature was created by just looking at the filename. We don't have to then go and check the file create date.

    What are the benefits of keeping the current approach?

  • 🇧🇪Belgium matthijs

    There's no "real" benefit, except preventing a call to the system's clock. But to be honest I'm not convinced of the timestamp usage, you could also display the file creation time when listing the files.

  • 🇨🇦Canada tame4tex

    Sure we could list the file create time but that is overkill for our current usage. It is simply a "nice to have". I guess we got used to the original naming convention and found it helpful at times.

    It doesn't seem like I am going to win you over, no worries, thanks for considering.

Production build 0.71.5 2024