Android Question Upload picture to my server

taylorw

Active Member
Licensed User
Hi all,i need to upload some picture to my server.
I have refer to this: post https://www.b4x.com/android/forum/t...o-server-appears-corrupted.75174/#post-477449
and i got some error.
B4X:
<HTML>

<HEAD>

<TITLE>405 Method Not Allowed</TITLE>

<BASE href="/error_docs/"><!--[if lte IE 6]></BASE><![endif]-->

</HEAD>

<BODY>

<H1>Method Not Allowed</H1>

The HTTP verb used to access this page is not allowed.<P>

<HR>

<ADDRESS>

Web Server at &#101;&#99;&#111;&#116;&#105;&#109;&#101;&#112;&#114;&#105;&#110;&#116;&#46;&#99;&#111;&#109;

</ADDRESS>

</BODY>

</HTML>



<!--

- Unfortunately, Microsoft has added a clever new

- "feature" to Internet Explorer. If the text of

- an error's message is "too small", specifically

- less than 512 bytes, Internet Explorer returns

- its own error message. You can turn that off,

- but it's pretty tricky to find switch called

- "smart error messages". That means, of course,

- that short error messages are censored by default.

- IIS always returns error messages that are long

- enough to make Internet Explorer happy. The

- workaround is pretty simple: pad the error

- message with a big comment like this to push it

- over the five hundred and twelve bytes minimum.

- Of course, that's exactly what you're reading

- right now.

-->

<HTML>

<HEAD>

<TITLE>405 Method Not Allowed</TITLE>

<BASE href="/error_docs/"><!--[if lte IE 6]></BASE><![endif]-->

</HEAD>

<BODY>

<H1>Method Not Allowed</H1>

The HTTP verb used to access this page is not allowed.<P>

<HR>

<ADDRESS>

Web Server at &#101;&#99;&#111;&#116;&#105;&#109;&#101;&#112;&#114;&#105;&#110;&#116;&#46;&#99;&#111;&#109;

</ADDRESS>

</BODY>

</HTML>



<!--

- Unfortunately, Microsoft has added a clever new

- "feature" to Internet Explorer. If the text of

- an error's message is "too small", specifically

- less than 512 bytes, Internet Explorer returns

- its own error message. You can turn that off,

- but it's pretty tricky to find switch called

- "smart error messages". That means, of course,

- that short error messages are censored by default.

- IIS always returns error messages that are long

- enough to make Internet Explorer happy. The

- workaround is pretty simple: pad the error

- message with a big comment like this to push it

- over the five hundred and twelve bytes minimum.

- Of course, that's exactly what you're reading

- right now.

-->
 

taylorw

Active Member
Licensed User
This is my coding
B4X:
Dim files As List
        files.Initialize
   
        Dim fd As MultipartFileData
        fd.Initialize
        fd.KeyName = "imagejpg"
        fd.Dir = Dir
        fd.FileName = FileName
        fd.ContentType = "image/jpg"
        files.Add(fd)
       
        Dim job As HttpJob
        job.Initialize("Upload_Image",Me)
        job.PostMultipart("http://www.ecotimeprint.com/uploaded_files/files",CreateMap("action":"Upload_Image"),files)
I'am sure the folder is already have permission,because i have a vb6 project, it can copy file to the server.
 
Upvote 0

taylorw

Active Member
Licensed User
Erel, so i need provide any information for my host server?
And i think my server can't support multipart upload.
 
Upvote 0
Top