Depends. What sort of files, sizes, purposes, etc. Are these files something that the visitor needs access to for a certain amount of time, then after than stick 'em in a corner? What upload asp component are you using? AspUpload, ABCUpload, etc, etc???
the documents are terms & conditions & documents to be downloaded by the users. after a few months it has to be put in a archive & they should be provided with a feature to download them by searching for a particular month or date.
i'm using aspupload to upload the files. i would like to know some method by which archiving is done as i have no idea how archiving is done on the server.
You can insert the file info in a database table. This table contains a unuque auto increment field called ID, because this is unique you can use this ID to give the uploaded file a name.
comm.CommandText = "set nocount on;insert into [tblDistiller] (date,orgFileName) VALUES ('" & now() & "','" & Replace(objRequest.Form("FileName", "'", "''", , , vbTextCompare) & "');SELECT @@IDENTITY AS newrec;SET NOCOUNT ON"
conn.Open
comm.ActiveConnection = conn
Set rs = comm.Execute
intID = rs!newrec
The above is t-SQL and works with SQL server.
Now use the intID to move the uploaded file to the archive directory giving it the name: [intID].
If a user searches a certain file (in this case the user can only look for the inserted date) you will get a resultset. Present the user with the orgFilenames of the result set.
If a user clicks on a certain file you can response.binarywrite the file to the browser or copy the file to a directory giving it it's original name back.
Putting the data in the database you can have versions, user security etc etc.
You can use allso Microsoft Index server to search files on content and modified date.
To start index server choose start -> run -> mmc.exe -> console -> add/remove snap in -> add -> indexing service -> local computer (or the IIS computer where your site is running) -> finish -> close -> single click on indexing service so it is selected -> ok
When you press F1 (help) with indexing services you can search on "making querys"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.