Download Url Token Question

adam

Administrator
Staff member
Dec 5, 2009
1,775
30
48
mfscripts.com
WEBSITE
https://yetishare.com
LOCATION
UK
#2
Ignore my last post, I see this is in presales.

These token links only last for 24 hours, so they won't work after then.

In addition, there's also an option in the code to limit them by IP if you'd prefer. The only restriction is that the document viewer plugin doesn't yet work in the IP restricted mode. (as it uses Google to view the documents and the IP from Google changes)

Thanks,
Adam.
 

JoeGamers

Member
YetiShare User
YetiShare Supporter
Feb 16, 2019
31
1
8
29
#3
¿Significa que puedo asignar un token para cada IP y evitar así el problema de la pérdida de enlaces y recursos?
¿Puedo cambiar la cantidad de horas de caducidad de cada grifo?
 

adam

Administrator
Staff member
Dec 5, 2009
1,775
30
48
mfscripts.com
WEBSITE
https://yetishare.com
LOCATION
UK
#9
Have a look in:
Code:
/core/includes/file.class.php
Search for:
Code:
// check token
You'll see:
PHP:
// $tokenData = $db->getRow('SELECT id, user_id, ip_address, file_id, download_speed, max_threads, file_transfer FROM download_token WHERE file_id = ' . $db->escape($this->id) . ' AND ip_address=' . $db->quote(coreFunctions::getUsersIPAddress()) . ' AND token = ' . $db->quote($downloadToken) . ' LIMIT 1');
$tokenData = $db->getRow('SELECT id, user_id, ip_address, file_id, download_speed, max_threads, file_transfer FROM download_token WHERE file_id = ' . $db->escape($this->id) . ' AND  token = ' . $db->quote($downloadToken) . ' LIMIT 1');
Uncomment the first line and comment out (or remove) the second. This will restrict the download by IP address.

Thanks,
Adam.