In a block of code i try to understand, a stream is published:
//Publish the stream as a binary and get the resulting URL
string replace = engine.PublishingContext.RenderedItem.AddBinary(inputStream, filename, "inline", mimetype).Url;
I noticed the stream (which is actually a xml ) is saved in the "images" folder on my server despite the fact i didn't mention anywhere the location desired for the publication.
Then, i checkedthe documentation and found this:
RenderedItem..::AddBinary Method (Stream, String, String, String)
Adds binary data as a Stream to the collection of binaries of the RenderedItem. It will be published to the context Publication images path with the specified filename. The binary can be identified by the specified variantId and is optionally related to a Component.
Thank you for your help A.