I have multiple nodes of the same content type with files. If the same user downloads files from multiple nodes, they only hit the Webform node (via Squeeze) on the first download. What would it take to make the squeeze module trigger every time? I've noticed when I clear the browser cache, the squeeze module fires on the second file download.

Comments

pavel.karoukin’s picture

This is actually a feature, not a bug :)

Check out lines 82-88 in squeeze.module. You can hack it or it will be better if you can add option for it. Both global and per-node.

fietserwin’s picture

What is your use case? Why bother the user with filling in a webform each and every time. You might be interested in the filefield_stats module that can track multiple downloads. Squeeze cooperates nicely with fielefield_stats.

fietserwin’s picture

In addition to my former comment: issue #1352480: Adding form data to file field stats (and related issue in filefield_stats module #1253580: and the anonymous users?) might cover what the OP is asking for. Linking them all together.

kbk’s picture

Thanks for the replies. Use case: I want to auto-email the "owner" of the downloaded file with information collected via the webform whenever a file is downloaded.

fietserwin’s picture

Better store that in the session and not bother the visitor again, but how to do that is not yet clear. Also see my comment #3 on the mentioned issue #1352480: Adding form data to file field stats.

kbk’s picture

I agree. I'm working on a solution right now. I use Squeeze to intercept and collect information from the downloading user. I then use Download Count to introduce a Rules event that fires when a file is downloaded. The action within this triggered rule matches the IP of the downloader to the most recently available webform submission (in the event that the IP has multiple webform submissions) and then puts the submitted form information into an email.

Still working on this but the above functionality is in place.

kbk’s picture

Status: Active » Closed (works as designed)