Announcement

Collapse
No announcement yet.

File to Attach Multiple

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File to Attach Multiple

    Hi all
    I have a client that has quite a few fields of type file but after 2 years they have asked if the fields can accept more than one file for upload.
    So simple question... is there a way to convert a File field to type Attach Multiple?
    Failing a simple solution, does anybody have experience with how to accomplish this task?
    Thanks for your consideration.
    Last edited by nickh; 11-28-2023, 05:43 PM.

  • #2
    Dont quote me on this but one trick I get this to work is to just delete the field, recreate it with same name.

    Comment


    • #3
      Thanks for this.
      When you have done this, does it maintain the existing file that is already present and allow more files to be added?

      Comment


      • #4
        You will need to carry over related_id => parent_id, related_type => parent_type for entries in the attachment table where field = 'yourFileField' AND related_type = 'YourEntityType'.

        Comment


        • #5
          Thanks Yuri. Very much appreciated.
          Sounds quite daunting when there are some 94000 attachments across 11 different fields. May try to encourage them to consider a different solution.

          Comment


          • #6
            It can be done with an UPDATE SQL query. Not that difficult. Just make sure you did a table backup before running.

            Comment

            Working...
            X