There is nothing else accessing the image.
I am currently on OpenBullet 2 version 0.1.16 [Beta]
I am suspecting it’s an Open Bullet Process which is accessing the image through this block
BLOCK:ConstantString
LABEL:Post this Constant Image
value = "K:\\Open Bullet from RDP test Results\\Open Bullet 2\\PureOpenBullet2\\Images\\Picture.jpg"
=> VAR @Images
ENDBLOCK
CLOG Yellow "==================***Upload Image***=================="
BLOCK:ConstantString
LABEL:Post this Constant Image
value = "Images\\Picture.jpg"
=> VAR @Images
ENDBLOCK
BLOCK:FileRead
LABEL:Images Read
path = @Images
=> CAP @Readimages
ENDBLOCK
BLOCK:HttpRequest
LABEL:Upload Image Post Ad Page
url = "https://example.com"
method = POST
customHeaders = {}
TYPE:MULTIPART
"WebKitFormBoundaryyG1Z7NAaYwlZEmw1"
CONTENT:FILE "imagen_0" @Readimages "image/jpeg"
ENDBLOCK
CLOG Yellow "==================***End Image***=================="
Alright so basically it’s not closing the handle, please open an issue on github (with a link to this post) and I will address this as soon as I can.
By the way, the last screenshot you sent shows a totally different error, which is caused by your code. You are reading the contents (as string) of the file by using this
BLOCK:FileRead
LABEL:Images Read
path = @Images
=> CAP @Readimages
ENDBLOCK
and then doing
CONTENT:FILE "imagen_0" @Readimages "image/jpeg"
This is wrong, you need to give it the path to the file on disk, you don’t have to read the file yourself.
Did you even read what I wrote? I said “this is wrong” right below the snippet you pasted. I wrote it to explain to you what exactly was wrong.
This is the correct way to do it.
Yes i know, not to declair the part like this “Images\Picture.jpg”. It’s non of my intension to use it this way. I actually want some some sort of variable as input for the images.
something like this
CONTENT:FILE "imagen_0" @Readimages "image/jpeg"
But when i tried it. It didn’t work. the Variable Readimages is supposed to vary the part to the image which is supposed to be uploaded at each pass.
BLOCK:FileRead
LABEL:Images Read
path = @Images
=> CAP @Readimages
ENDBLOCK
BLOCK:HttpRequest
LABEL:Upload Image Post Ad Page
url = "https://example.com"
method = POST
customHeaders = {}
TYPE:MULTIPART
"WebKitFormBoundaryyG1Z7NAaYwlZEmw1"
CONTENT:FILE "imagen_0" @Readimages "image/jpeg"
ENDBLOCK
But it doesn’t work as intended atleast from my point of view.
Mate, File Read will read the CONTENTS of the file. You don’t have to read the contents!!! OB2 does it automatically you just need to give it the name of the file. Do you understand? You DO NOT need a FileRead block in order to upload files. You just need to give it the path to the file so it can know where to read it from.
YEAH… I know i don’t have to read the content. I just wanted to make sure READing Images works. This is eactly what i wanted I was able to find a solution.
BLOCK:GetFilesInFolder
LABEL:Get Images In Folder
path = "Images"
=> VAR @imagesOutput
ENDBLOCK
FOREACH path IN imagesOutput
CLOG Yellow "=========================Before-Upload======================="
BLOCK:HttpRequest
LABEL:Upload Image Post Ad Page
url = "https://example.com"
method = POST
customHeaders = {}
TYPE:MULTIPART
"WebKitFormBoundaryyG1Z7NAaYwlZEmw1"
CONTENT:FILE "imagen_0" @path "image/jpeg"
ENDBLOCK
CLOG Yellow "=========================After-Upload======================="
END