Hi,
I want to generate a JPG image and may b with some submit button want to upload the generated Image into a server. I do know how to generate an image in PHP, but how to upload the same directly to server
-Regards
Dhrubajyoti
Image Generation+uploading of this Image
Moderator: General Moderators
-
dhrubajyoti85
- Forum Newbie
- Posts: 3
- Joined: Tue Jul 05, 2011 2:33 am
-
Noodleyman
- Forum Newbie
- Posts: 23
- Joined: Thu Jun 23, 2011 4:49 pm
Re: Image Generation+uploading of this Image
Why don't you save the image direct to the server upon its creation, rather than posting it in a form back to your server?
I think it would be much better to do that.
I think it would be much better to do that.
-
dhrubajyoti85
- Forum Newbie
- Posts: 3
- Joined: Tue Jul 05, 2011 2:33 am
Re: Image Generation+uploading of this Image
I am fine with saving it in Server, but I am generating an Image with Imagecreate(), and I want to save it in server only...
How do I do that...?
Just now I found out something called header('Content-Disposition: Attachment;filename=image.jpg'); --- but this pops-up the image to be saved, but I dont want that, I want it to b saved in server
How do I do that...?
Just now I found out something called header('Content-Disposition: Attachment;filename=image.jpg'); --- but this pops-up the image to be saved, but I dont want that, I want it to b saved in server
Re: Image Generation+uploading of this Image
Save with imagepng or imagejpeg.dhrubajyoti85 wrote:I am fine with saving it in Server, but I am generating an Image with Imagecreate(), and I want to save it in server only...
No need to mess with headers or buttons or anything. That's only when you need to send or show something to the visitor. You just want to save the image on the server, and therefore don't need to output anything to the user.
-
dhrubajyoti85
- Forum Newbie
- Posts: 3
- Joined: Tue Jul 05, 2011 2:33 am
Re: Image Generation+uploading of this Image
Thanks for the reply Apollo,
Got it...
Got it...