B4J Question httpjob PostFile (Error : No File Found to Upload) - Erel (first post)    Dec 26, 2021 Job.PostFile sends the file content as the raw payload. If your server expects a multipart/form-data request (I don't think that there is application/form-data) then you should use Job.PostMultipart. B4A Question postfile error - aeric (first post)    Apr 29, 2023 job.PostFile(Link As String, Dir As String, FileName As String)
You are passing wrong value to the function. Try:
Dim S As String = "http://192.168.5.80:54340/v1.?sign=202305.jpg"
job.PostFile(S, Dir, "202305.jpg")
* Dir is the directory of the file B4A Question job.PostFile $_FILES['file'] Empty - Daniele Zanoni    Mar 18, 2020 I'm using okHttp and OkHttpUtils2
In my application the user take a Photo, then he have to upload it,
but using j.PostFile or using j.PostMultipart the $_FILES is ALWAYS EMPTY.
Link = "http://mysite.com/upload.php"
myphoto = "myphoto.jpg"
'
Dim Files as List
Dim mp As MultipartFileData
Files.Inizi B4J Question [SOLVED} Write file to server using jRDC2? - MrKim (first post)    Sep 30, 2021 As I said, it is the server side I am having trouble with. PutFile is part of HttpJob on the client side.
The example I found using PutFile was something like this:
H.PostFile($"http://${IPAddre.Text}:${PortNum}/writefile?type=file&name=${su.EncodeUrl(FilePathAndName, "UTF8")}"$ , Fdir, FN)
The fi B4i Question Postfile to PHP - Erel (first post)    Aug 06, 2017 Your code is correct. It reads the file and sends it as a POST message (not multipart). The server code is not related to the client code. If you have a PHP code working with B4A then it will work with B4i as well. B4A Question Postfile OR Http Multipart Requests for Bitmaps? - Erel (first post)    Mar 17, 2015 It really depends on what the server expects. PostFile create a POST request with the file data as the request payload. If your server is configured to handle it then it is indeed very simple. You can use standard url parameters with PostFile.
If your server only accepts multipart requests then you B4A Question PostFile in OK Httputils2 (2.92) starts a GET method not POST method - labcold (first post)    Sep 30, 2020 Thanks for taking time and for your quick reply.
I am confused though and not quite sure how I should proceed.
I followed the tutorial by Erel on this and this is essentially how he did it - although he used POSTBYTES not POSTFILE.
As the server is my own B4J server then I need to add the extras to B4A Question How to use PostFile to upload file? - Rabbit (first post)    Jan 16, 2015 By the way,
Can I use PostFile as below?
Dim sendimg As HttpJob
sendimg.Initialize("StringJob", Me)
sendimg.PostFile("http://www.xxx.com/upload_file.php", File.DirRootExternal & "/test/", "001.jpg")
_____ Share My Creation [Project Template] Web API Server 2 - aeric    Jan 16, 2025   (30 reactions) (new) WebApiUtils v2.08
(new) MiniORMUtils v1.13
(new) WebAPIController v1.07
(change) Use DbFile instead of DbName for SQLite in config.ini
(change) Move code from ConfigureDatabase sub to Initialize sub in DatabaseConfiguration class
(remove) Delete build configurations and code for Firebird, Post B4A Question Target SDK 28/29 NoClassDefFound - Erel (first post)    Nov 17, 2020 If POST is also fine then use Job.PostFile. If the file is not too large then you can use Job.PostBytes with File.ReadBytes. Page: 1   2   3   4   5   6   7   Powered by ColBERT |