Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Jmiles165899169
		
			Jmiles165899169Hi Team,
I am able to upload .jpg with postman
but in talend I am confused how I can pass my .jpg path in trestclient
 ann-gaelle
		
			ann-gaelle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi in fact you can transfer the schema of your tfixedflowInput on the tRestclient. That should solve this error normally. (by propagating changes, or by looking to the schema of the entrance in the tRestClient)
Hope it helps,
Good luck
 Jmiles165899169
		
			Jmiles165899169Hi any suggestion team
Appreciate your help.
Thanks
 ann-gaelle
		
			ann-gaelle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
If you only need to pass the path of the jpg try to put before the tRestClient a tWriteJsonField with the adequat structure here I think it's { "photo" : "C:/PATHOFPICTURES" } and then a main row from the writeJsonField to tRestClient. It's the main row which gives body to tRestClient.
However if it's an image, it would be helpful to know what does it means ? Is it a matrix of the images wich is needed ? Or something else ?
 Jmiles165899169
		
			Jmiles165899169Hi @Ann-Gaëlle Gouerec thanks for reply , It is a image which I want to upload
 Jmiles165899169
		
			Jmiles165899169I'm trying with below parameters & headers but getting below error
 
 
 ann-gaelle
		
			ann-gaelle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Photo is not a query parameter. In postman it appears as body. To pass it as body you will need to pass the information by the row and adding other component to structure it the way your api wants it. If it wants JSON you need to read a json file per exemple (or write a json field) with the adequate strucutre 🙂 An easy solution to test it rappidely is to put a a tfixedflow before your tRestclient and then you add one variable "body" at your schema with the type string. Then you give it the value "{ \"photo\" : \"Path_of_your_photo\" }". Then you put a main row between tfixedflow and trestclient. This is an exemple if the body must be JSON and that's the path that you want to send.
Hmmm however you said that wasn't the path that you wanted to send but the pictures itself ? So, for that I would say try to see I you can retrieve an exemple of the body wich is really sent in postman and not just a postman vizualisation maybe it could help you to debug ?
Sorry I can't help more, but maybe those ideas would help 🙂
 Jmiles165899169
		
			Jmiles165899169@Ann-Gaëlle Gouerec I have tried with JSON structure but its throwing me error because tRestClient component body data type is document
 ann-gaelle
		
			ann-gaelle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi @Juanita miles ,
Did you name the column that contains your json string, "string" too ?
If it's still not working with this name you can delete "body" of your schema of trestclient for the entry. Like that it will know that the entry only have the string and nothing else.
 Jmiles165899169
		
			Jmiles165899169@Ann-Gaëlle Gouerec
I have created one context variable as ImagePath & in which I am give value "{ \"photo\" : \"Path_of_my_photo\" }" & then in tfixedflow I created one column , in which I'm giving context variable value 
tFixedFlow column data type is string & tRestClient "body" data type is document so I can't put this value in tRestClient & if I'm putting row6.body value in out13.string then I'm getting error. 
Error: {"message":"An error occurred.","trackingNumber":"75f52e..........78e8c8f"}
 Jmiles165899169
		
			Jmiles165899169Hi team any suggestions
