robert.access Posted September 26, 2009 Share Posted September 26, 2009 hi! My users are able to upload pic to my site and then to see them. My script show the pictures in bmp format (you can upload any type) and I want my server to save them in jpeg format for fast upload. Can anyone tell me from where to start? ThaNK YOU! Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/ Share on other sites More sharing options...
khr2003 Posted September 26, 2009 Share Posted September 26, 2009 it really depends on the server. I do not know how it is faster to upload them in jpg rather than bmp since their size will not change. Anyway, I think you need to modify some headers information in php, see these links for more information: http://au.php.net/manual/en/function.header.php http://www.jonasjohn.de/snippets/php/headers.htm Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925143 Share on other sites More sharing options...
robert.access Posted September 26, 2009 Author Share Posted September 26, 2009 Thank you very much for the answer. I will try those links right now. Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925145 Share on other sites More sharing options...
robert.access Posted September 26, 2009 Author Share Posted September 26, 2009 It's my fool, I want to say my website allow users to upload photos (but it upload in bmp). How can I make it to upload in jpeg??? ... more better 80% smaller. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925149 Share on other sites More sharing options...
redarrow Posted September 26, 2009 Share Posted September 26, 2009 Your current code must be validating the .ext Change the mime type to jpeg Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925159 Share on other sites More sharing options...
robert.access Posted September 26, 2009 Author Share Posted September 26, 2009 thanks for answer but how exactly to do that? I am noob here.... Please give me detailed instruction. Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925165 Share on other sites More sharing options...
robert.access Posted September 26, 2009 Author Share Posted September 26, 2009 need something in htaccess????? Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925171 Share on other sites More sharing options...
redarrow Posted September 26, 2009 Share Posted September 26, 2009 read this link provided, got what you want. always try Google before posting for example mate, we fix broke php codes, we don't mind if there from another web site, but we like to fix code not post Google links all day.... http://www.webcheatsheet.com/PHP/file_upload.php All you had to do is write in goggle (upload .jpg file php only 6 half million results. Quote Link to comment https://forums.phpfreaks.com/topic/175568-picture-upload-hep/#findComment-925174 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.