Can't POST file: Error 1104

I'm trying to POST a file to my server. However, I get error 1104.


Error is returned with and without join('file:///', item)
I'm trying to loop through my pictures and POST them to my server.
I believe the problem is with AI2 and not my code, as my server isn't giving an error.
P.S. Am I suppose to have file:///?
Edit: Patch request works, but post doesn't.

You need to use the web1.GotText event to capture the response from the first upload in order to initiate the next upload.

What does item look like, is it a full path to the file? Are the files created by the app ?

Item is a full path to the file (DCIM/Camera/{photo}). The files are photos I've taken.
Adding a blank event handler didn't fix the problem, unfortunately. One of the videos I found said it was related to the url, but didn't say how to fix it.

That is a relative path. Try feeding the full path in the POST.FILE block e.g.:

/storage/emulated/0/Android/data/<package_name>/files/DCIM/Camera/photo.png

I still get an error, even with full path.

Wrong path to you file....

image

you may need to remove file:// (I am not sure)

image

Apparently I DO need the file:///, so I'll filter it out in my server. Anyways, it works with the following code:


I think it may have been a server issue. Thank you for your time!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.