If a user attaches a file but does not fill out all required fields before submitting the form, they are correctly brought back to the form to fill out the rest of the required fields, but the file attachment is lost. Lovely module. Thanks so much.

Comments

quicksketch’s picture

Status: Active » Postponed

Thanks, this is a known problem but I can't seem to locate an existing issue that describes it, so we'll continue here. This is generally a limitation of HTML itself (or browsers more specifically), where it is impossible to set the "value" attribute of a File field due to the security concerns (you wouldn't want a website uploading files off your computer without manually selecting the file). So unfortunately, I don't think there is an *easy* solution to this.

The only possible work-around is to save the file on upload no matter what. Unfortunately the Drupal validation system prevents *any* processing if there is a missing required field.

This issue is related to both:
#216529: File Upload Doesn't Work With Page Break -- Upgrade File Component to use FID values instead of file arrays
#266287: mandatory components interfere with previous page button

It will likely be solved only when both of those have been solved. I'm moving to "postponed" for the time being.

mrfelton’s picture

This is tagged as a D5 issue, but I think the issue is also true for D6 no?

mrfelton’s picture

Version: 5.x-2.2 »

Since #216529: File Upload Doesn't Work With Page Break -- Upgrade File Component to use FID values instead of file arrays has been bumped up to 6.x-3.x-dev and this isn't going to be fixed until that other bug is, I'm bumping this up to 6.x-3.x-dev too.

bgildea’s picture

I would like to see these fixed. It causes a usability issue upon validation on webforms with page breaks and file uplaods.

Thank you!!!

quicksketch’s picture

Version: » 6.x-3.x-dev

Most likely this will only be fixed in the Drupal 7 version, now that we can use the 'managed_file' element provided by it (which also enables #748806: Upload progress bar for Webform).

ngstigator’s picture

subscribing

setvik’s picture

Need this for a client's D6 project. I'd be happy to take a crack at a patch but am new to webform. Any hints on where to start?

parijke’s picture

Version: 6.x-3.x-dev » 7.x-3.13

This is still happening in 7.X-3.13

Great module by the way!

quicksketch’s picture

In Drupal 7, this problem will ultimately be mitigated by #289919: Provide AJAX-based file uploads/Progress Bar for uploads. It will probably never be fixed in Drupal 6.

quicksketch’s picture

Status: Postponed » Closed (won't fix)

#289919: Provide AJAX-based file uploads/Progress Bar for uploads is now ready to go for Drupal 7, fixing this issue. In Drupal 6, this won't ever be added.

tmsimont’s picture

I might have to write a module or a patch to do this in Drupal 6... I've got a D6 site almost ready for launch and this might be a big issue with the client. I notice that before validation, the file does get uploaded. Can you provide any info on where that file goes before validation or how to recover it? thanks.