We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36711
    • 68 Posts
    hi guys!

    I am struggling to figure out how I could configure the fileupload module so that each time a file is being uploaded it will overwrite if same file already exists on the server.

    Here is the idea:
    There are pdf files which are being updated from time to time, so basically the filenames remain the same, only the content is changing. This is becasuse these PDF file are linked from certain webpages.

    Now, I have created a separate html page on which I am using the fileupload module and giving access only to the user group I want to. I have done this to make them easily update the PDF files by uploading the new ones with new content but same file name.

    Now everything is almost configured, however I got stuck in this overwriting issue. Any idea?
    I would appreciate helping me out.
    I am using MODX Rev 2.1.0 pl adv

    thanx in adv
      sherlockseo
      • 36711
      • 68 Posts
      so, no any clue yet?
      someone? anyone

      I’d really appreciate someone getting involved in this issue
        sherlockseo
        • 36711
        • 68 Posts
        now I was wondering if I would use the FormIt module instead
        would it solve the overwriting issue? any experience on that?
          sherlockseo
          • 3749
          • 24,544 Posts
          Your wish is my command. wink

          Download FileUpload version 1.0.1-rc1 and add &allowoverwrite=`1` to the tag.

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36711
            • 68 Posts
            hi Bob and thanks for your reply

            a little bit confused
            I quickly tried to make the update but didn’t find the version you mentioned neither for the fileupload nor the FormIt module
            my versions:
            fileupload 1.0.0
            formit 1.7.0 (2.0.0 available to upgrade)
            MODX Rev. 2.1.0 pl adv

            what am I missing here? just to get it clear

            and lots of thanks
              sherlockseo
              • 36711
              • 68 Posts
              well, you must have misspelled it smiley
              the new version is FileUpload 1.0.1-rc1 not FileUpload 2.0.1-rc1 smiley

              I already see in the log file the new overwriting property you added

              lots of thanks,

              now, let’s try it
                sherlockseo
                • 36711
                • 68 Posts
                now we tested and works perfectly

                thanx a lot Bob
                  sherlockseo
                  • 3749
                  • 24,544 Posts
                  Yes, it’s 1.0.1. Sorry for the confusion. I’m glad it works for you. smiley
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting