Android Question POST action and FileData type...


Licensed User
Longtime User

What I actually are trying to solve is to send a file to a server. I have find some threads about it, but then I got a new problem with "FileData" type. I get
"Unknown Type: filedata
Are you missing a library reference?"

I have tried to check all Libraries in the Libraries Manager but still same error. Are there som way to find out what Library that type are to be find, or can somebody tell me what Library I need to download?

This is the post action i want to execute with my code:

<form method="POST" action="" enctype="multipart/form-data">
<input type="file" name="update">
<input type="submit" value="Update">

I have tried with HttpJob.PostFile function, but that didn't work.

Then I found this thread:
But then I got problem with the "FileData" type.


Licensed User
Longtime User
1. See the first note in the link you found!
For new projects it is recommended to use OkHttpUtils2:
2. Switch from http and httputils to
3. Code to upload using okhttputils2
Dim j As HttpJob
j.Initialize("j", Me)
Dim fd As MultipartFileData
fd.KeyName = "update"
fd.Dir = File.DirAssets
fd.FileName = "image.png"
fd.ContentType = "image/png"
j.PostMultipart("http://...", CreateMap("param1": "value1"), Array(fd))
Last edited:
Upvote 0