Re: File upload question

From: Date: Thu, 22 Jan 2004 01:14:09 +0000
Subject: Re: File upload question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-175381@lists.php.net to get a copy of this message
Hi, You recommend to allocate post id when "Compose mail" pressed and set draft(boolean) = true. Than I can attach files one by one linking them to post_id in DB. This approach is better than mine, I think, as files will be already linked to post_id in DB and if post will never be submitted prune script will delete records from DB and files from FS using same criterias (timestamp + draft=true). In my approach files will be stored somewhere in /draft directory and their names have to be passed as html form parameters if later on Submit will occur. Than they will be moved to /attch dir being linked to DB entries. Igor "Raditha Dissanayake" <jabber@raditha.com> wrote in message news:400F1F80.2050802@raditha.com... > Hi Igor, > The approach taken by yahoo etc is the most popular. In your case you > will just need to enter the message in it's entirity in the database as > you normally would but perhaps mark it as a draft so that it does not > become visible. > > SHAMLESS PLUG: alternatively you can use rad upload at > http://www.radinks.com/upload/ which can fit the bill including > uploading any number of files. > > all the best > > Igor Kryltsov wrote: > > >Hi, > > > > > >If I allow multiple file uploads in my custom designed discussion board if > >there any way to collect all attachments file names by reloading page and > >than upload all of them on "Post" button (form submission)? > > > >Displaying multiple <input type=file ....> on a page does not look as a > >nice solution to me as amount of allowed attachments can be unrestricted. > > > >It looks like all web based systems(yahoo mail, hotmail) upload files to > >server one by one and than , I guess, they have type of pruning system which > >cleans server's file system to delete files which were uploaded as a part of > >"compose new mail" but never saved by web users. > >I think it is done by looking for a files which does not have corresponding > >entries in DB + timestamp on files which should be greater than session > >timeout for system (if defined). > > > >To summarize: If anyone has an idea how to collect file names of files to > >upload by rePOSTing script and finally submit it to upload all files as one > >go. > > > > > >Thank you, > > > > > >Igor > > > > > > > > > -- > Raditha Dissanayake. > ------------------------------------------------------------------------ > http://www.radinks.com/sftp/ | > http://www.raditha.com/megaupload > Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader > Graphical User Inteface. Just 150 KB | with progress bar.

« previous php.general (#175381) next »