I created a test order and was able to download the item 5 times when it was set at 3. The counter on the page changes to 1 but doesn't go past that. If I refresh the page, it is always 0. Anyone know what gives?
Thanks!!
File download limit is not working
|
|
It's the 5 'deluxe' install package - I got it here last weekend.
Thanks
So you're saying then, that the "# of downloads" also doesn't get updated in the Files list? Are you downloading the entire file each time, or only starting it and stopping it? I think that the update only happens once the file is closed (at the completion of the download) but I could be mistaken.
If you are downloading the whole thing and the limit isn't working, I can take a look - although it seems odd that the download count wouldn't be getting updated. That works fine for me.
Yes, I downloaded the file fully each time, just double checked the file size.
this isn't working for me either...
resets to 0 every time. annoying cause i'm trying to keep track of how many times my promotional press download is actually being accessed.
Details? Browser, OS, Drupal version, module version?
I use this on a production and live server and have not seen this problem.
I can reproduce the issue with the latest version of Chrome (0.2.149.30). While testing the IE bug, I found that when using Chrome, I can repeatedly download the file using either the anonymous link, or by logging in and clicking on downloading the file. The counter doesn't increment.
My system is running Drupal 5.10 and UC 5.x-1.5.
Hello, seemingly have similar issues. For example I have set the download period to 24 hours, and the file download limit to 1. It seems to increment correctly when I let the file download finish all the way. The link will become unusable.
However, when I start to download the file and about half way through I suspend the download (In Safari on Mac clicking on the "x" icon next to the downloads in the downloads window) and then resume the download at a later time by clicking the resume icon inside the Safari downloads window, I can download the rest of the file without incrementing the file downloads. So, but following that we have unlimited downloads.
So for now I will have to try to restrict the downloads by IP address also to see that I can limit this somehow, but it would sure be nice if this was working somehow.
Using the following:
Drupa: 5.10
Ubercart: 5.x-1.5
Please advise.
Thank you in advance,
Martin
Ahh, very interesting. I might direct cha0s and torgosPizza here... the code was updated to allow for download resume, but I'm not sure this was an expected behavior. 
I wonder if we should consider incrementing the count before the download starts or perhaps not allowing for download/resume if a download limit is in place...
Well.. I am not sure what needs to be done here. That's why I came here in the first place
But any help/update to the uc_file module would be appreciated 
Martin
PS: Thank you for the super fast reply!
Yeah I guess we'll need to increment the count when the download starts. This might mean changing the way the # of download limit is handled, since now it's on the other side of the download. Not a huge fix, I don't think.
If one of you guys can't get to it, let me know. (This is launch week for us so I'm pretty busy.)
I cannot reproduce this. Are you going by the number of links on a user's file page to determine the number of total downloads? If so this is an incorrect indication. You should refresh and check the download links page after you've finished resuming the download.
There is no AJAX or real-time update of the download table on the user's file page. When you click it increments the number by one (if it's not above the limit) even if you don't finish the file. If you were to for instance:
Start downloading file
Pause it
Refresh file download table
You'll see that the table has not had the download you just started registered yet.
Download numbers are no incremented until 'eof'... That means until the function actually spitting out file data to the client hits the very last piece of the file, it won't increment the download count. I don't think I changed that logic, I'm pretty sure it was always this way. Resuming won't affect this, as soon as the code sees "I'm at the end of the file", the download is logged (which involves invalidating the key, adding one to downloads, etc).
You might notice the new warning I put in uc_file under the download table due to the last chunk being when the server will cut off any new attempts on the existing fid/key pair. (the weird link you get in your email)
Once your download is finished, you must refresh the page to download again. (Provided you have permission) Downloads will not be counted until the file is finished transferring, even though the number may increment when you click. Do not use any download acceleration feature to download the file, or you may lock yourself out of the download.
Reason for that is, with those download accelerators, they don't necessarily download in linear order... they might start one chunk at the beginning, one 1/4 through, one 1/2 through and one 3/4 through... now the point is if the one that's 3/4 goes a little bit faster, and completes (to the end of the file) before the others can, you've just locked yourself out of (and incremented) the download now.
HTH, please if you have a scenario I can reproduce with some steps, let me know. 
EDIT: We can't log the download before the file is finished completing... otherwise we can't allow resuming at all because the key associated with that transfer will be invalidated. I don't see a problem with the current system in this regard.
Cool write-up, cha0s. I wasn't sure if this was actually a problem... it's hard for us to test since we don't limit by download, just by IP. Anyways thanks for looking into it and clarifying. 
Ok, I am not making this up. I just tested it again. I have the limits set to:
1 file download
2 IP numbers
1 day
So I go and click the download link and it starts to download the file, then let's say I click on the Mac Safari 3 (latest) cancel button in the download link to suspend the download. Then after a few minutes I go ahead and click the resume icon in the download window. And now I let the download finish. Then I go ahead and refresh the file download table page, click the file link, and bingo.. download starts again.
So, maybe I am doing something wrong here, but this is what I am getting.
Thank you for looking into this. Any further help is appreciated.
Martin
I can reproduce the issue on Chrome. Here's a more detailed description:
Using the one time link from the automated email, I can download the file successfully as many times as I want. It doesn't matter if I close the browser or tab and click on the link again.
After logging in and accessing the file downloads, after I click on the file, it downloads successfully and increments by 1. However, if I do not leave the page and click on the file again, I can download it with no incrementing, as many times as I want. If I go to another page and then come back, then this behavior repeats itself.
|
|






Joined: 09/21/2008