PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

upload changes file name

  1. All
    Member

    Overview:
    - create a form with an upload file field
    - login > form > entries
    - edit form
    - upload new file to the upload file field
    - save form
    - open local document
    - make minor edits
    - upload modified document to same field.

    Issue:
    - changes the file name and adds 1 to the filename ex. text.txt to text1.txt

    desire
    - do not modify filename
    - change document id reference

    any way to do this?

    Posted 12 years ago on Friday June 22, 2012 | Permalink
  2. All
    Member

    update?

    Posted 12 years ago on Tuesday June 26, 2012 | Permalink
  3. The only way I can think of to do this is to delete the file which was uploaded, so that the name of the file is not changed (by adding the -1 or -2 to the end.)

    I'm not sure about the document ID reference. Can you explain what happens now and what you would like to happen instead?

    Posted 12 years ago on Wednesday June 27, 2012 | Permalink
  4. All
    Member

    Now
    - submitting a file with the exact same name and on the same date changes the name of the file by appending 1 to it (assuming 2 will be added if the same file is uploaded a third time)

    Instead
    - submitting the file specified above repeatedly on the same day show not change the name of the file

    Posted 12 years ago on Wednesday June 27, 2012 | Permalink
  5. The only way I know of to accomplish this part is to remove the original attachment. Then when the revised document is uploaded, there will be no collision with the file name, and no number will be appended.

    Posted 12 years ago on Wednesday June 27, 2012 | Permalink
  6. David Peralty

    In order to do this, you would have to detect if the file name is in use, delete the file that has the filename currently, then upload the new file, and there currently isn't an easy way to code such a thing within the limitations of Gravity Forms. WordPress does the same thing when uploading a file (re: appending a 1 or 2... if file name is already in use).

    Posted 12 years ago on Wednesday June 27, 2012 | Permalink