Hey there,
I use GFFormsModel::get_file_upload_path() to have the upload path of my form. (I need that to encode the file in base64 and send it as json).
The function run like this :
GFFormsModel::get_file_upload_path(2, $entry[‘27’]);
2 is my form ID, entry[27] is my upload field ID.
It return me the correct path put with a “1” at the end of the name before the extension of the file.
Small example for you to understand :
My filename uploaded : cat.jpg
it return me this path :
C:\wamp64\www\site/media/gravity_forms/2-9ee019472ceebe32aa74f6c77f01d990/2022/03/cat1.jpg
It add “1” to the name, I dont understand why. And so, the path isnt correct, cause the file is stored as “cat.jpg”, in the folder and in the database.
I deleted all the saved entry of the form, cause the same file name could add a number 1 to prevent having the same file at the same place, but it change nothing. (if the name would be cat1.jpg, the function would return cat11.jpg…)
Hope someone can help me with this, and hope my post is easily understandable