No error is diplayed. I remember in log that was memory issue.
Sorry i finally find a solution by modifying and using gravity wiz rename plugin but this code was so simple that i want it to work and understand what is the problem.
The changelog for 2.8.6 does include the following line:
API: Updated the file upload field value in the draft entry from GFFormsModel::create_lead() to contain a JSON encoded array of file details instead of the incorrect file URL.
GFFormsModel::get_current_lead(), which your code uses, calls GFFormsModel::create_lead() if there isn’t a cached entry available.
So if field ID 1 in your code is a file upload field, you’ll need to update your code to account for that change. Here’s an example:
That will give you an array of arrays. Each array contains the details about a file. This is the same for both the standard file upload field and the multi-file enabled field.
You can then access the details of the first file like so: