Courier transfers uploaded images to a wrong location (local fs instead of custom one)
I have noticed that when transferring media items with Courier from one instance to another, all of the actual images are created on the local machine instead of our hosting service (CloudFiles on Rackspace).
Tried to fix this issue by creating an alternative DataResolver for Umbraco.UploadField, but to no avail. When the item is packaged I get the Stream containing the image and save it to the item's resource's ResourceContents with the intention of creating the file manually using our custom CloudFiles file system, but when it arrives on the other instance, ResourceContents is just an empty byte array.
public override void Packaged(Item item)
{
...
var test = item.Resources.Where(r => r.ExtractToPath == str1).FirstOrDefault();
test.ResourceContents = ReadToEnd(fs.OpenFile(str1));
// Read to End converts Stream to byte[], at this moment the ResourceContent in Resource within the item is filled with the image converted to byte[]
}
public override void Extracting(Item item)
{
var s = item.Resources[0].ResourceContents; //there's only one resource, the same that was packaged and at this point ResourceContents is always an empty byte array.
}
Is there a way to force Courier to use custom file provider or fix this issue in any other way?
Courier transfers uploaded images to a wrong location (local fs instead of custom one)
I have noticed that when transferring media items with Courier from one instance to another, all of the actual images are created on the local machine instead of our hosting service (CloudFiles on Rackspace).
Tried to fix this issue by creating an alternative DataResolver for Umbraco.UploadField, but to no avail. When the item is packaged I get the Stream containing the image and save it to the item's resource's ResourceContents with the intention of creating the file manually using our custom CloudFiles file system, but when it arrives on the other instance, ResourceContents is just an empty byte array.
Is there a way to force Courier to use custom file provider or fix this issue in any other way?
Anyone?
is working on a reply...