|
Posted by Rich on 01/19/07 18:20
On 18 Jan 2007 07:27:26 -0800, Gene wrote...
>
>good way to do this is not upload file to your database. I think you
>shold upload file to server file system, and only filename to your
>database. i've always do this thats way.
I've used that approach to. It's probably a lot more efficient to store the
graphics in your regular file system, and store the name and path information in
the database. That way if you need to access an image you can query the data
base to get the location and print the result in your HTML output. Probably a
lot cleaner than pulling the image from database and processing that.
Rich
--
Newsguy.com - Basic Accounts $39.95 / 12 months
75+ days of Binary and Text Retention
http://newsguy.com/overview.htm
>Jeff napisal(a):
>> "Jeff" <it_consultant1@hotmail.com.NOSPAM> wrote in message
>> news:JMmdnRUP8rIZSDPYRVnzvQ@telenor.com...
>> > Hey
>> >
>> > I'm trying to develop a web portal using php 5.2.0. At this web portal I
>> > want to provide users with a picture upload functionality. They can upload
>> > pictures to their profiles etc. I want the pictures to be stored in the
>> > MySql database (storing images in db may not a good thing from a
>> > performance perspective). I'm not sure how to upload a picture file into a
>> > MySql database, so I've been googling for a while. I came accross this
>> > great example
>>>
>>http://wellho.co.uk/solutions/php-example-php-form-image-upload-store-in-mysql-database-retreive.html
>> > I'm wondering if this code actually could work if many users are trying
>> > upload the files simultaneously. Is there a possibility when many uses are
>> > uploading images simultaneously that an image can be uploaded to the wrong
>> > profile?
>> >
>> > Jeff
>> >
>>
>> Okay. I haven't solved this issue, but I've read in the php documentation.
>> So this post is considered solved. To make sure the file names are unique it
>> could be a good idea to add a timestamp (using time() ) to the filename of
>> the picture. And then use md5 on the filename...
>>
>> Jeff
>
Navigation:
[Reply to this message]
|