Updating attachments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • allwin
    Member
    • Jan 2005
    • 71

    Updating attachments

    Hello Guys,

    We need to update certain attachments on the forum. Is it possible to replace the file without affecting the download count on the attachment ? If so, how can this be done ? Attachments are currently being stored as files in the filesystem and not in the DB.
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    There is no way to do this without hacking or modifying the database. If it's just a few attachments, the easiest way to do this is to edit the 'counter' field in the attachment table manually for these attachments.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • conqsoft
      Senior Member
      • Jul 2003
      • 3803
      • 3.6.x

      #3
      Originally posted by allwin
      Hello Guys,

      We need to update certain attachments on the forum. Is it possible to replace the file without affecting the download count on the attachment ? If so, how can this be done ? Attachments are currently being stored as files in the filesystem and not in the DB.
      Since you're using the file system, if you could track down the file in the file system, you could replace it with another one. If the file size changed, you would have to manually edit the DB to reflect that.
      vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

      Comment

      • allwin
        Member
        • Jan 2005
        • 71

        #4
        Originally posted by Steve Machol
        There is no way to do this without hacking or modifying the database. If it's just a few attachments, the easiest way to do this is to edit the 'counter' field in the attachment table manually for these attachments.
        Counter field ? Where is that .. ? Yes,they're just a few attachments.. If I am able to delete the old attachment and reupload the new one , its fine.

        Just let me know how do I edit the counter for those specific attachments..

        Comment

        • Steve Machol
          Former Customer Support Manager
          • Jul 2000
          • 154488

          #5
          The counter field is in the attachment table. You can use phpMyAdmin to access and edit this.
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment

          • allwin
            Member
            • Jan 2005
            • 71

            #6
            If I delete the attachment and reupload it, the attachment no. would change and so would the link to it. The attachment is widely linked .. anyway I can keep the attachment no and still do the above modifications ?

            Comment

            • allwin
              Member
              • Jan 2005
              • 71

              #7
              No updates folks ?

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                Did you try my suggestion in post #5?
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment

                • allwin
                  Member
                  • Jan 2005
                  • 71

                  #9
                  What if I need to retain the attachment ID as well ? I think I confused you here. I would like to retain the attachment ID, change the file, update the counters ..

                  As far as I can see, the counter can be updated thru phpmyadmin, but I believe the attachment ID would change.. is there a way to maintain the attachment iD too ?

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    My suggestion will not change anything except the counters, which is what I thought you were trying to correct.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • allwin
                      Member
                      • Jan 2005
                      • 71

                      #11
                      As I asked in my prev. post, is there a way to maintain the attachment iD too ? This is because many people have directly linked to the attachment.

                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        As I stated my instructions do not change the attachmentid. Only the counters.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...