Re: [WebDNA] Downloadable file protection
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106344
interpreted = N
texte = --Apple-Mail-31-569355223Content-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=us-asciiMatthewIf you have a look at the builtin webstore you will see that it has a =method of protection there.Basically it copies a file to a delivery folder and renames the file, =this link is sent to the purchaser.You then set up a trigger that clear out any file that is x hours old.=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DCREATE FILE AND SEND EMAIL:[text]WebDelFolder=3Dwebdelivery/[/text][text]AttachFile=3DPURCHASEDFILE.pdf[/text][text]StockFolder=3Dstockroom/[/text][text]UniquePrefix=3D[Random][Random][Random][search =db=3D^letters.db&neLetterdatarq=3Dfind_all&raLettersort=3D1&max=3D4][found=items][letter][/founditems][/search]_[/text][!]Copy the file from the stockroom folder to the webdelivery folder[/!][!]This should create a unique name[/!][copyfile [!][/!]from=3D[StockFolder][AttachFile][!][/!]&to=3D[WebDelFolder][uniqueprefix][AttachFile][!][/!]][Sendmail =to=3D[lowercase][_EMAIL][/lowercase]&from=3Dno-reply@xxxx.com&subject=3DFi=le Download]Hi [capitalize][_name][/capitalize]Thanks for your interest in xxxxx, here is a link to download a =brochure,=20this link will only last for 24 hours from [date] [time].http://www.xxx.com/[WebDelFolder][uniquePrefix][AttachFile][/Sendmail]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DTRIGGER FILE (fires every 60 minutes):[text]WebDelFol=3Dwebdelivery/[/text][math show=3Df]age=3D86401[/math] [!] -------------- 24 hours in =seconds +1 -------------- [/!][math show=3Df]today=3D{[date]}[/math][math show=3Df]now=3D{[time]}[/math][math show=3Df]cur=3D0[/math][listfiles folder=3D[webdelfol]][HideIf [filename]=3Dindex.html][text]tooold=3DF[/text][math show=3Df]secs=3D{[CreateTime]}+[age][/math][math show=3Df]the_date=3D{[CreateDate]}+floor(secs/86400)[/math][math show=3Df]the_time=3Dsecs%86400[/math][showif [the_date]<[today]][text]tooold=3DT[/text][/showif][showif [the_date]=3D[today]][showif [the_time]<[now]][text]tooold=3DT[/text][/showif][/showif][index] - [filename] [CreateDate] [CreateTime][showif [tooold]=3DT]- old[text]filename[cur]=3D[filename][/text][math show=3Df]cur=3Dcur+1[/math][/showif]
[/HideIf][/listfiles]
[loop start=3D0&end=3D[math]cur-1[/math]][deletefile file=3D[webdelfol][interpret][filename[index]][/interpret]]
[interpret][filename[index]][/interpret] Deleted[/loop]
Sweep Completed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DRegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 26/02/2011, at 7:23 AM, Psi Prime Inc, Matthew A Perosi wrote:> Has anyone here thought through the process involved with creating a =protections of some type for a doanoadable file?>=20> I need to sell access to PDF and mp4 files from my site, but obviously =I don't want to use the real file name because someone will just share =them.>=20> What I'm looking for is something like Amazon S3 that provides =authentication and prevents file access.>=20> My thoughts are that someone could be authenticated, and then a raw =download could be sent with an encoded file name, but the header needs =to correctly identify the file type so the browser knows how to handle =it.>=20> Currently when I sell eBooks direct from my website I copy them to a =doanload directory and rename them as the user. That way if someone =ever shares the file we know who did it.>=20> I'd be grateful if anyone has through through this and wants to share =their ideas. I'm not looking for exact code, just to be pointed in the =right directions.>=20> Thanks!>=20> --=20> Matthew A Perosi> Computer Engineer> Senior Web Developer> SEO Analyst& Educator>=20> Psi Prime, Inc.> 323 Union Blvd.> Totowa, NJ 07512>=20> Service: 973.413.8211> Training: 973.413.8214> Fax: 973.413.8217>=20> http://www.psiprime.com>=20>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us--Apple-Mail-31-569355223Content-Transfer-Encoding: quoted-printableContent-Type: text/html;charset=us-asciiMatthew
If =you have a look at the builtin webstore you will see that it has a =method of protection there.
Basically it copies =a file to a delivery folder and renames the file, this link is sent to =the purchaser.
You then set up a trigger that =clear out any file that is x hours old.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D
CREATE FILE =AND SEND EMAIL:
[text]WebDelFolder=3Dwebdelivery/[/text]
[text]AttachFile=3DPURCHASEDFILE.pdf[/text]
[text]StockFolder=3Dstockroom/[/text]
[text]UniquePrefix=3D[Random][Random][Random][search= =db=3D^letters.db&neLetterdatarq=3Dfind_all&raLettersort=3D1&ma=x=3D4][founditems][letter][/founditems][/search]_[/text]
[!]Copy the file from the stockroom =folder to the webdelivery folder[/!]
[!]This should create a unique =name[/!]
[copyfile [!]
[/!]from=3D[StockFolder][AttachFile][!]
[/!]&to=3D[WebDelFolder][uniqueprefix][AttachFile][!]
[/!]]
[Sendmail =to=3D[lowercase][_EMAIL][/lowercase]&from=3Dno-reply@xxxx.com&subj=ect=3DFile Download]
Hi [capitalize][_name][/capitalize]
Thanks for your interest in xxxxx, =here is a link to download a brochure,
this =link will only last for 24 hours from [date] [time].
[/Sendmail]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D
TRIGGER =FILE (fires every 60 minutes):
[text]WebDelFol=3Dwebdelivery/[/text]
[math show=3Df]age=3D86401[/math] [!] =-------------- 24 hours in seconds +1 -------------- =[/!]
[math show=3Df]today=3D{[date]}[/math]
[math =show=3Df]now=3D{[time]}[/math]
[math show=3Df]cur=3D0[/math]
[listfiles =folder=3D[webdelfol]]
[HideIf [filename]=3Dindex.html]
[text]tooold=3DF[/text]
[math =show=3Df]secs=3D{[CreateTime]}+[age][/math]
[math =show=3Df]the_date=3D{[CreateDate]}+floor(secs/86400)[/math]
[math =show=3Df]the_time=3Dsecs%86400[/math]
[showif [the_date]<[today]]
[text]tooold=3DT[/text]
[/showif]
[showif =[the_date]=3D[today]]
[showif =[the_time]<[now]]
[text]tooold=3DT[/text]
[/showif]
[/showif]
[index] - [filename] [CreateDate] =[CreateTime]
[showif =[tooold]=3DT]
- old
[text]filename[cur]=3D[filename][/text]
[math show=3Df]cur=3Dcur+1[/math]
[/showif]
<br>
[/HideIf]
[/listfiles]
<hr>
[loop =start=3D0&end=3D[math]cur-1[/math]]
[deletefile =file=3D[webdelfol][interpret][filename[index]][/interpret]]
<i>[interpret][filename[index]][/interpret] =Deleted</i><br>
[/loop]
<h2>Sweep Completed</h2>
Regards
Stuart Tremain
IDFK =Web Developments
AUSTRALIA
=div>
On 26/02/2011, at 7:23 AM, Psi Prime Inc, Matthew A Perosi =wrote:
Has anyone here thought through the process involved =with creating a protections of some type for a doanoadable =file?
I need to sell access to PDF and mp4 files from my site, =but obviously I don't want to use the real file name because someone =will just share them.
What I'm looking for is something like =Amazon S3 that provides authentication and prevents file =access.
My thoughts are that someone could be authenticated, and =then a raw download could be sent with an encoded file name, but the =header needs to correctly identify the file type so the browser knows =how to handle it.
Currently when I sell eBooks direct from my =website I copy them to a doanload directory and rename them as the user. = That way if someone ever shares the file we know who did =it.
I'd be grateful if anyone has through through this and wants =to share their ideas. I'm not looking for exact code, just to be =pointed in the right directions.
Thanks!
--
Matthew A =Perosi
Computer Engineer
Senior Web Developer
SEO Analyst& = Educator
Psi Prime, Inc.
323 Union Blvd.
Totowa, NJ =07512
Service: 973.413.8211
Training: = 973.413.8214
Fax: = 973.413.8217
http://www.psiprime.com--=-------------------------------------------------------
This message =is sent to you because you are subscribed to
the mailing list =<talk@webdna.us>.
To unsubscribe, E-mail to: =<talk-leave@webdna.us>
archives: =http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: =support@webdna.us
=--Apple-Mail-31-569355223--
Associated Messages, from the most recent to the oldest:
--Apple-Mail-31-569355223Content-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=us-asciiMatthewIf you have a look at the builtin webstore you will see that it has a =method of protection there.Basically it copies a file to a delivery folder and renames the file, =this link is sent to the purchaser.You then set up a trigger that clear out any file that is x hours old.=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DCREATE FILE AND SEND EMAIL:
[text]WebDelFolder=3Dwebdelivery/[/text]
[text]AttachFile=3DPURCHASEDFILE.pdf[/text]
[text]StockFolder=3Dstockroom/[/text]
[text]UniquePrefix=3D
[random][random][random][search =db=3D^letters.db&neLetterdatarq=3Dfind_all&raLettersort=3D1&max=3D4][found=items][letter][/founditems][/search]_[/text]
[!]Copy the file from the stockroom folder to the webdelivery folder[/!]
[!]This should create a unique name[/!][copyfile
[!][/!]from=3D[StockFolder][AttachFile]
[!][/!]&to=3D[WebDelFolder][uniqueprefix][AttachFile]
[!][/!]][Sendmail =to=3D
[lowercase][_EMAIL][/lowercase]&from=3Dno-reply@xxxx.com&subject=3DFi=le Download]Hi
[capitalize][_name][/capitalize]Thanks for your interest in xxxxx, here is a link to download a =brochure,=20this link will only last for 24 hours from
[date] [time].http://www.xxx.com/[WebDelFolder][uniquePrefix][AttachFile][/Sendmail]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DTRIGGER FILE (fires every 60 minutes):
[text]WebDelFol=3Dwebdelivery/[/text][math show=3Df]age=3D86401[/math]
[!] -------------- 24 hours in =seconds +1 -------------- [/!][math show=3Df]today=3D{
[date]}[/math][math show=3Df]now=3D{
[time]}[/math][math show=3Df]cur=3D0[/math][listfiles folder=3D[webdelfol]][HideIf [filename]=3Dindex.html]
[text]tooold=3DF[/text][math show=3Df]secs=3D{[CreateTime]}+[age][/math][math show=3Df]the_date=3D{[CreateDate]}+floor(secs/86400)[/math][math show=3Df]the_time=3Dsecs%86400[/math][showif [the_date]<[today]]
[text]tooold=3DT[/text][/showif][showif [the_date]=3D[today]][showif [the_time]<[now]]
[text]tooold=3DT[/text][/showif][/showif][index] - [filename] [CreateDate] [CreateTime][showif [tooold]=3DT]- old
[text]filename[cur]=3D[filename][/text][math show=3Df]cur=3Dcur+1[/math][/showif]
[/HideIf][/listfiles]
[loop start=3D0&end=3D
[math]cur-1[/math]][deletefile file=3D[webdelfol]
[interpret][filename[index]][/interpret]]
[interpret][filename[index]][/interpret] Deleted[/loop]
Sweep Completed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3DRegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 26/02/2011, at 7:23 AM, Psi Prime Inc, Matthew A Perosi wrote:> Has anyone here thought through the process involved with creating a =protections of some type for a doanoadable file?>=20> I need to sell access to PDF and mp4 files from my site, but obviously =I don't want to use the real file name because someone will just share =them.>=20> What I'm looking for is something like Amazon S3 that provides =authentication and prevents file access.>=20> My thoughts are that someone could be authenticated, and then a raw =download could be sent with an encoded file name, but the header needs =to correctly identify the file type so the browser knows how to handle =it.>=20> Currently when I sell eBooks direct from my website I copy them to a =doanload directory and rename them as the user. That way if someone =ever shares the file we know who did it.>=20> I'd be grateful if anyone has through through this and wants to share =their ideas. I'm not looking for exact code, just to be pointed in the =right directions.>=20> Thanks!>=20> --=20> Matthew A Perosi> Computer Engineer> Senior Web Developer> SEO Analyst& Educator>=20> Psi Prime, Inc.> 323 Union Blvd.> Totowa, NJ 07512>=20> Service: 973.413.8211> Training: 973.413.8214> Fax: 973.413.8217>=20> http://www.psiprime.com>=20>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us--Apple-Mail-31-569355223Content-Transfer-Encoding: quoted-printableContent-Type: text/html;charset=us-asciiMatthew
If =you have a look at the builtin webstore you will see that it has a =method of protection there.
Basically it copies =a file to a delivery folder and renames the file, this link is sent to =the purchaser.
You then set up a trigger that =clear out any file that is x hours old.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D
CREATE FILE =AND SEND EMAIL:
[text]WebDelFolder=3Dwebdelivery/[/text]
[text]AttachFile=3DPURCHASEDFILE.pdf[/text]
[text]StockFolder=3Dstockroom/[/text]
[!]Copy the file from the stockroom =folder to the webdelivery folder[/!]
[!]This should create a unique =name[/!]
[/!]from=3D[StockFolder][AttachFile]
[!][/!]&to=3D[WebDelFolder][uniqueprefix][AttachFile]
[!][/!]]
[Sendmail =to=3D
[lowercase][_EMAIL][/lowercase]&from=3Dno-reply@xxxx.com&subj=ect=3DFile Download]
Thanks for your interest in xxxxx, =here is a link to download a brochure,
[/Sendmail]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D
TRIGGER =FILE (fires every 60 minutes):
[text]WebDelFol=3Dwebdelivery/[/text]
[math show=3Df]age=3D86401[/math]
[!] =-------------- 24 hours in seconds +1 -------------- =[/!]
[math show=3Df]today=3D{
[date]}[/math]
[math =show=3Df]now=3D{
[time]}[/math]
[math show=3Df]cur=3D0[/math]
[listfiles =folder=3D[webdelfol]]
[HideIf [filename]=3Dindex.html]
[math =show=3Df]secs=3D{[CreateTime]}+[age][/math]
[math =show=3Df]the_date=3D{[CreateDate]}+floor(secs/86400)[/math]
[math =show=3Df]the_time=3Dsecs%86400[/math]
[showif [the_date]<[today]]
[/showif]
[showif =[the_date]=3D[today]]
[showif =[the_time]<[now]]
[/showif]
[/showif]
[index] - [filename] [CreateDate] =[CreateTime]
[showif =[tooold]=3DT]
- old
[text]filename[cur]=3D[filename][/text]
[math show=3Df]cur=3Dcur+1[/math]
[/showif]
<br>
[/HideIf]
[/listfiles]
<hr>
[loop =start=3D0&end=3D
[math]cur-1[/math]]
[deletefile =file=3D[webdelfol]
[interpret][filename[index]][/interpret]]
<i>[interpret][filename[index]][/interpret] =Deleted
</i><br> [/loop]
<h2>Sweep Completed</h2>