cancel
Showing results for 
Search instead for 
Did you mean: 

Limited Download Tickets Extension - Alternative

linsys
Champ in-the-making
Champ in-the-making
I found this project proposal http://wiki.alfresco.com/wiki/Limited_Download_Tickets_Extension and it looks like it hasn't been picked up by anyone, but I was wondering if there was a similar project which was further along?

Specifically it would be nice to be able to select a content item, generate a unique URL (which doesn't require authentication to access) and set a download limit on that URL for instance 2 downloads or set a time expiration such as 24 hours. After the number of downloads or time expires then that content URL is no longer available.. The content item is still available inside of Alfresco and a new content URL could be created.

Thanks.
3 REPLIES 3

jottley
Confirmed Champ
Confirmed Champ
This would not be that difficult to implement.

1) A web script that generates the unique URL extension (Or – you could even use one of the public URL shorteners to generate the URL). (Depending on how you do this…like if you were doing this as a UI action it could be a js script). If you wanted to keep this all in Alfresco you could either keep the map of unique URLs as a content items in Alfresco (single file or as a multi valued property on a node). I would probably go with having an aspect added to the stores the unique URL extension.

2) A web script mapper that when called with the unique ID, looks up the appropriate node and returns a standard html page (generated from an FTL) that starts a download and gives them a link where they can start the download.

3) To manage the length of time or count: This would be part of the aspect that is added to the node.  For count after the max number of downloads (through the URL mapper script) removes the aspect.  For the length of time, have the URL mapper check to see if the time has expired.  If expired have it remove the aspect. Or you could leave it  for future instance that you want to re-enable this for…but you you return some message.

4) Part of the script that generates the unique ID would also give read-only permission to "EVERYONE" for the node/content for the duration of your access logic.

In total you are probably looking at 2 or 3 web scripts.

Jared

cooperspick
Champ in-the-making
Champ in-the-making
This would not be that difficult to implement.

1) A web script that generates the unique URL extension (Or – you could even use one of the public URL shorteners to generate the URL). (Depending on how you do this…like if you were doing this as a UI action it could be a js script). If you wanted to keep this all in Alfresco you could either keep the map of unique URLs as a content items in Alfresco (single file or as a multi valued property on a node). I would probably go with having an aspect added to the stores the unique URL extension.

2) A web script mapper that when called with the unique ID, looks up the appropriate node and returns a standard html page (generated from an FTL) that starts a download and gives them a link where they can start the download.

3) To manage the length of time or count: This would be part of the aspect that is added to the node.  For count after the max number of downloads (through the URL mapper script) removes the aspect.  For the length of time, have the URL mapper check to see if the time has expired.  If expired have it remove the aspect. Or you could leave it  for future instance that you want to re-enable this for…but you you return some message.

4) Part of the script that generates the unique ID would also give read-only permission to "EVERYONE" for the node/content for the duration of your access logic.

In total you are probably looking at 2 or 3 web scripts.

Jared
Since it wasnt that diffucult to implement I have to ask was it ever successfully implemented?

zaizi
Champ in-the-making
Champ in-the-making
Yes, currently in production for a client. We went with

3) To manage the length of time or count: This would be part of the aspect that is added to the node. For count after the max number of downloads (through the URL mapper script) removes the aspect. For the length of time, have the URL mapper check to see if the time has expired. If expired have it remove the aspect. Or you could leave it for future instance that you want to re-enable this for…but you you return some message.

Ainga