View Full Version : چگونه DownLoad ها رو کنترل کنم
shahramasp
شنبه 21 بهمن 1385, 23:24 عصر
بازم یه سوال دیگه !
چگونه می توانم یک لینکی رو که آدرسش یک فایل رو درست کنم که به محز کلیک روی آن پنجره مربوط به دانلود باز بشه . ضمنا می خوام تعداد دانلو های هر فایل رو بدونم کمکم کنید لطفا
متشکرم
ali_kolahdoozan
شنبه 21 بهمن 1385, 23:36 عصر
هنگام کلیک روی لینک توی دیتا بیس تعداد رو ببر بالا از حدی که دلت می خاد وقتی گذشت دیگه اجازه دانلود نده
SalarSoft
یک شنبه 22 بهمن 1385, 06:41 صبح
با استفاده از این کلاس می تونی در یک صفحه عمل دانلود رو برای کاربر انجام بدی!
در ضمن این کلاس از Resumable download هم پشتیبانی می کنه!
shahramasp
یک شنبه 22 بهمن 1385, 23:03 عصر
ممنون کلا وی بی ندارین ممنون می شم
SalarSoft
دوشنبه 23 بهمن 1385, 07:38 صبح
این هم از VB
saeid taheri
چهارشنبه 25 بهمن 1385, 19:43 عصر
آیا در صفحه html هم می شود تعداد کلیک روی صفحه را مشخص کرد ؟ منظورم بدون استفاده از دیتابیس است
shahramasp
چهارشنبه 25 بهمن 1385, 23:59 عصر
خوشبختانه بازم خودم پیدا کردم
Dim strRequest As String = "~/UserFileComment/Test.Pdf"
'Request.QueryString("file") '-- if something was passed to the file querystring
If strRequest <> "" Then 'get absolute path of the file
Dim path As String = Server.MapPath(strRequest) 'get file object as FileInfo
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
If file.Exists Then 'set appropriate headers
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "application/octet-stream"
Response.WriteFile(file.FullName)
Response.End() 'if file does not exist
Else
Response.Write("This file does not exist.")
End If 'nothing in the URL as HTTP GET
Else
Response.Write("Please provide a file to download.")
End If
hamed_bostan
پنج شنبه 26 بهمن 1385, 23:27 عصر
دوست عزیز اگر اینطوری می نوشتید چقدر بهتر بود
Dim strRequest As String = "~/UserFileComment/Test.Pdf"
'Request.QueryString("file") '-- if something was passed to the file querystring
If strRequest <> "" Then 'get absolute path of the file
Dim path As String = Server.MapPath(strRequest) 'get file object as FileInfo
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
If file.Exists Then 'set appropriate headers
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "application/octet-stream"
Response.WriteFile(file.FullName)
Response.End() 'if file does not exist
Else
Response.Write("This file does not exist.")
End If 'nothing in the URL as HTTP GET
Else
Response.Write("Please provide a file to download.")
End If
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.