Re: Using POST to send bitmap image with Java



Kenneth P. Turvey wrote:
I'm actually in the process of doing this right now. I'm going to be posting the image to a URL that is a PHP script. When I was looking at this I thought that this really made more sense to use a PUT method to post the image, but the guy working on the PHP side insisted on using a POST method.

Is there a reason that POST would be selected over PUT for this application? Are there reasons to go with PUT here?

PUT file

uploads a file to specified name via a builtin mechanism
in the web server.

POST uploadscript

send a file to the specified script that can save it as
a file or in a database or whatever.

Not all web servers support or is configured to allow PUT,
while POST is supported by all web servers.

With POST you can also use form based multi part where you
can upload additional info about the file and multiple files
in a single POST.

Arne

.



Relevant Pages

  • Re: Using POST to send bitmap image with Java
    ... posting the image to a URL that is a PHP script. ... When I was looking at this I thought that this really made more sense to use a PUT method to post the image, but the guy working on the PHP side insisted on using a POST method. ... Not all web servers support or is configured to allow PUT, ... Posting a message to a bulletin board, newsgroup, mailing list, ...
    (comp.lang.java.programmer)
  • Re: Calling PHP file
    ... name or domain name of where the file/script is located that called the ... PHP script in question? ... your web servers access_log. ... people can be accessing with web browsers that jumble up the referral ...
    (alt.php)
  • Re: PHP Upload Script - Files uploaded Corrupt
    ... >> Can anyone help I have a php script that uploads files to a mysql ... But why do you want to use a database for the files? ...
    (Fedora)
  • Re: secure ftp upload behind a firewall
    ... I have a small php script that uploads a file once an hour via FTP. ... My server allows me to connect via sftp ...
    (alt.php)
  • php email attachment, chmod settings
    ... I have a php script from Obie which uploads a file to ... the web server, then attaches it to an email, and sends it to a default ...
    (comp.lang.php)