-
Upload/Download component
I have been playing around with a few of the commercially available asp upload
components. I have an application that I would like to use this in where
I allow a user to upload a file (or files) and tie these to a specific record.
Then when the next user views the record they have the option of viewing
the files associated with it. I have the upload working great but I am unsure
how to call the file(s) from the database to allow a user to view it. Can
anyone point me in the right direction?
Thank you
Terry
-
Re: Upload/Download component
In most upload cases, I store the file to a tmp dir, name the file what I
want to name it, and then move it to the directory I want it in. I then
store in the database, the path information to the file. Not the blob file
itself. Some upload componets allow you to name the file as part of the
upload, in that case, I don't need to store in a temp dir.
When I want to display that file, all I have to to is reference it by the
path name stored in the db. (This assuems the file is of a type supported
by viewing in the browser, or the visitor will be prompt for download)
Just one way to skin a cat.
Not that one should ever skin a cat or harm any animals in such a manner,
or any manner that would be deemed as unethical in your environment.
Heh...
Cheers,
Q*bert
"Terry" <snakbrat@yahoo.com> wrote:
>
>I have been playing around with a few of the commercially available asp
upload
>components. I have an application that I would like to use this in where
>I allow a user to upload a file (or files) and tie these to a specific record.
> Then when the next user views the record they have the option of viewing
>the files associated with it. I have the upload working great but I am
unsure
>how to call the file(s) from the database to allow a user to view it. Can
>anyone point me in the right direction?
>
>Thank you
>
>Terry
>
>
>
>
-
Re: Upload/Download component
Hi,
If you use Oracle then do the following.
1.Create directory on machine that Oracle is running on.
2.Grant access to nobody (internet user).
3.Open SQL PLUS and create directory by this command:
create directory dir_name as 'your_dir_on_host'
4.Upload file to your directory on machine in item 1.
5.Write store procedure to call DBMS_LOB package to read this file to database.

dman
"Q*bert" <luke_davis_76@hotmail.com> wrote:
>
>In most upload cases, I store the file to a tmp dir, name the file what
I
>want to name it, and then move it to the directory I want it in. I then
>store in the database, the path information to the file. Not the blob file
>itself. Some upload componets allow you to name the file as part of the
>upload, in that case, I don't need to store in a temp dir.
>
>When I want to display that file, all I have to to is reference it by the
>path name stored in the db. (This assuems the file is of a type supported
>by viewing in the browser, or the visitor will be prompt for download)
>
>Just one way to skin a cat.
>Not that one should ever skin a cat or harm any animals in such a manner,
>or any manner that would be deemed as unethical in your environment.
>
>Heh...
>
>Cheers,
>Q*bert
>
>"Terry" <snakbrat@yahoo.com> wrote:
>>
>>I have been playing around with a few of the commercially available asp
>upload
>>components. I have an application that I would like to use this in where
>>I allow a user to upload a file (or files) and tie these to a specific
record.
>> Then when the next user views the record they have the option of viewing
>>the files associated with it. I have the upload working great but I am
>unsure
>>how to call the file(s) from the database to allow a user to view it.
Can
>>anyone point me in the right direction?
>>
>>Thank you
>>
>>Terry
>>
>>
>>
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|