When sending the same request that includes a form data file multiple times, the file pointer points to the end of the file for all subsequent calls after the first call. Thus, the server side application receives an empty file for those calls.
Before every request call the file pointers of all files should be reset via file.seek(0). This sets the file pointers to point to the beginning and the server side applications won't receive empty files for subsequent calls anymore.
When sending the same request that includes a form data file multiple times, the file pointer points to the end of the file for all subsequent calls after the first call. Thus, the server side application receives an empty file for those calls.
Before every request call the file pointers of all files should be reset via
file.seek(0)
. This sets the file pointers to point to the beginning and the server side applications won't receive empty files for subsequent calls anymore.