Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amir Khan 1199 posts 2567 karma points
    Nov 14, 2013 @ 19:05
    Amir Khan
    0

    Return image uploaded by contour form in examine results

    Hi,

    I'm running a search wtih examine and am getting an error when trying to return a string to a file uploaded by contour. I feel like it has something to do with the file being in the /umbraco/ path...

    Any ideas? Code below along with an example of the string being stored:

    String: /umbraco/plugins/umbracoContour/files/fad74fd1-79a8-4b68-9748-2d6c91adbebe/102_2164_L.JPG

     

    Search:

    @using Examine
    @using Examine.SearchCriteria
    @using UmbracoExamine
    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

    @{
    Layout = "CWS-Master.cshtml";

    //Get the query from the form that has been posted
    var searchString = Request.Form["q"];
    var searchProvider = ExamineManager.Instance.DefaultSearchProvider.Name;
    var searchResults = ExamineManager.Instance.SearchProviderCollection["InternalMemberSearcher"].Search(searchString, true);
    }
    <h2>Search Results</h2>
    <h4>You searched for <em>@searchString</em></h4>
    <h5>Displaying @searchResults.Count() results</h5>
    <ul>
    @foreach (var result in searchResults)
    {

    <li>
    @result.Fields["memberPhoto"]
    <a href="/user/@result.Fields["profileURL"]">@result.Fields["nodeName"]</a>
    </li>
    }
    </ul>
  • Amir Khan 1199 posts 2567 karma points
    Nov 19, 2013 @ 19:02
    Amir Khan
    0

    Anything?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies