File uploader

This is a discussion on "File uploader" within the PHP Forum section. This forum, and the thread "File uploader are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Jan 7th, 2008, 12:43
Reputable Member
Join Date: Sep 2007
Location: UK
Age: 42
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
File uploader

Been asked to do a concept for work which is to upload artwork at our website rather than e-mail it.

Basically there is 3 step system.

1. Enter your details
2. Upload your image
3. Submit

I understand all the principles of the file uploader and the form submitter.

My question is how do i allow customers to upload the picture on the page so it can be checked in size and format before the page is submitted?

It's hard to explain in words but an example is something like facebook or bebo, where you choose your picture and it uploads before you submit the page.

I am using majority of php for this but not sure if maybe this is javascript feature...

Thanks

Jtyoungs
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 7th, 2008, 16:46
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: File uploader

http://uk3.php.net/getimagesize Thats to check the image size. I can show you my image resizer script if you wish also.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 7th, 2008, 16:52
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,402
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: File uploader

Check these tutorials:
http://www.phpeasystep.com/php-cate....ry=file-upload
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 9th, 2008, 09:39
Reputable Member
Join Date: Sep 2007
Location: UK
Age: 42
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Re: File uploader

not what i was looking for... that's the easier part... cheers anyways guys.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jan 9th, 2008, 15:36
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: File uploader

You will have to use AJAX to upload the images.
It's pretty complex though.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jan 17th, 2008, 21:03
New Member
Join Date: Jan 2008
Location: home
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Post Re: File uploader

- About your file format it will not be a problem to check from javascript.
- But regarding the file size it's not so simple:
- an idea is to use the upload limit from php.ini file but this method will not be so friendly for your users
- an ajax check will be the best idea and you need these steps:

1. create an ajax request and send data by POST method
2. on server upload the file and check the size
3. if the size is allowed return a confirmation message
4. otherwise delete the image and show an error message

- I don't have an example now but I will try to create one tomorrow.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
uploader filename alexgeek JavaScript Forum 0 Oct 8th, 2007 17:25
Multi file uploader and folder create 737mechanic PHP Forum 1 Sep 29th, 2007 11:03
how do I use a:hover within a html file (without the css file) heyo Web Page Design 2 Mar 5th, 2007 22:50
Creating a log file (text file) and an XML file using XSL kdelacruz Other Programming Languages 1 Nov 4th, 2006 21:12
How make Word file same as html file in ASP humair Classic ASP 5 Sep 24th, 2003 14:35


All times are GMT. The time now is 09:04.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42