To get items from particular provider you simply have to pass the providerName to the GetManager() method. This way you will operate with imtes from that provider only.Kind regards,
I did a small test using Sitefinity 5.4. Both websites are running on dev. web
server from VS2012. I prepared small video for problem demonstration: http://webbywell.com/actions.swf.html. Problem description below:
I created two websites. A and B.
Uploaded test image in the first website (A).
For the second website (B) I added new connection string to point to another
database to pull out images. Also I created new provider (ww4Images) for
Libraries (I used this post as a guide).
For new provider (ww4Images) I specified two parameters:
connectionString (pointing to new connection string)
After application restart, I was able to see two providers available to select
for images and other content items. If I switch to the second provider I can
see the test image but it is broken (see broken_image.png). It is broken in
Album and Details views.
If I go to the details view and check Link value I see:
Site A: localhost:12350/.../test.jpg (valid)
Site B: localhost:60876/.../test.jpg (broken)
Next step: On site B using ww4Images provider I upload another image (pic.png).
And it shows up just fine on site B in Album and Detail views (see second_image_siteB).
Link values for this image:
- Thumbnail in album: localhost:12350/.../pic.png.tmb (valid)
- Image in Details view: localhost:12350/.../pic.png
Site B: localhost:60876/.../pic.png
Please let me know what I’m missing here. It has to be something about
provider URL name. I have seen another parameter name for Libraries provider
called urlName, I tried to add it, but it doesn't change anything.
Also I can delete image upload in site A from site B using second provider.
One more observation, I can add new image using second provider and this
image becomes available in the in the website.
Actualy, it turns out that having multiple providers for media libraries is not possible at the moment. The reason comes from the fact that metadata for images is stored in the database, so if you pull images from an external database, your project won't have access to the metadata. We have logged a bug on the problem and will do our best to fix it as soon as possible. Please follow the PITS link to track its status:
As a workaround you can setup a DropBox provider, which will allow you to store image in dropbox and your project will be able to pull those images from the same source. You can read more about this option here: