Having trouble getting FineUploader's Initial File List feature working












0














I've spent too much time on this feature already. I've read the documentation, I've searched Stackoverflow. The problem I'm having is that I always get success = false and of course no files are loaded. Documentation says if it has a problem parsing any item in the response but I'm at a loss as to what I'm doing wrong.



Here is what my server returns in response to the Inital Files request:



{{
"uuid": "3377cc66-51d2-4e80-a695-f9018e379b7b",
"path": "~/UploadedFiles/6f633f07-b23a-43f1-8256-f0dfe9fc9abb",
"originalFilename": "Cut Offs.png",
"name": "636785647541018142.png",
"size": null,
"thumbnailUrl": null
}}


On the client side I am able to retrieve each of these properties just fine. Thinking that perhaps it was choking on something else I reduced it down to just the uuid and the name as those are the only ones required but I got the same result. It didn't work and the success parameter comes in as false.



The sessionRequestComplete is firing off just fine but success is always false.



Here is what I have on the server:



public FineUploaderResult GetFiles(string type)
{
List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

JObject json = new JObject();

if ( documents != null && documents.Count > 0 )
{
string jsonString = JsonConvert.SerializeObject(documents);

jsonString = jsonString.TrimStart(new char { '[' }).TrimEnd(new char { ']' });
json = JObject.Parse(jsonString);
}
return new FineUploaderResult(true, json);


}



Am I not returning the proper thing? Here's the constructor for FineUploader Result in case that helps.



public FineUploaderResult(bool success, object otherData = null, string error = null, bool? preventRetry = null)
{
_success = success;
_error = error;
_preventRetry = preventRetry;

if (otherData != null)
_otherData = JObject.FromObject(otherData);
}


Any help would be most appreciated.










share|improve this question





























    0














    I've spent too much time on this feature already. I've read the documentation, I've searched Stackoverflow. The problem I'm having is that I always get success = false and of course no files are loaded. Documentation says if it has a problem parsing any item in the response but I'm at a loss as to what I'm doing wrong.



    Here is what my server returns in response to the Inital Files request:



    {{
    "uuid": "3377cc66-51d2-4e80-a695-f9018e379b7b",
    "path": "~/UploadedFiles/6f633f07-b23a-43f1-8256-f0dfe9fc9abb",
    "originalFilename": "Cut Offs.png",
    "name": "636785647541018142.png",
    "size": null,
    "thumbnailUrl": null
    }}


    On the client side I am able to retrieve each of these properties just fine. Thinking that perhaps it was choking on something else I reduced it down to just the uuid and the name as those are the only ones required but I got the same result. It didn't work and the success parameter comes in as false.



    The sessionRequestComplete is firing off just fine but success is always false.



    Here is what I have on the server:



    public FineUploaderResult GetFiles(string type)
    {
    List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

    JObject json = new JObject();

    if ( documents != null && documents.Count > 0 )
    {
    string jsonString = JsonConvert.SerializeObject(documents);

    jsonString = jsonString.TrimStart(new char { '[' }).TrimEnd(new char { ']' });
    json = JObject.Parse(jsonString);
    }
    return new FineUploaderResult(true, json);


    }



    Am I not returning the proper thing? Here's the constructor for FineUploader Result in case that helps.



    public FineUploaderResult(bool success, object otherData = null, string error = null, bool? preventRetry = null)
    {
    _success = success;
    _error = error;
    _preventRetry = preventRetry;

    if (otherData != null)
    _otherData = JObject.FromObject(otherData);
    }


    Any help would be most appreciated.










    share|improve this question



























      0












      0








      0







      I've spent too much time on this feature already. I've read the documentation, I've searched Stackoverflow. The problem I'm having is that I always get success = false and of course no files are loaded. Documentation says if it has a problem parsing any item in the response but I'm at a loss as to what I'm doing wrong.



      Here is what my server returns in response to the Inital Files request:



      {{
      "uuid": "3377cc66-51d2-4e80-a695-f9018e379b7b",
      "path": "~/UploadedFiles/6f633f07-b23a-43f1-8256-f0dfe9fc9abb",
      "originalFilename": "Cut Offs.png",
      "name": "636785647541018142.png",
      "size": null,
      "thumbnailUrl": null
      }}


      On the client side I am able to retrieve each of these properties just fine. Thinking that perhaps it was choking on something else I reduced it down to just the uuid and the name as those are the only ones required but I got the same result. It didn't work and the success parameter comes in as false.



      The sessionRequestComplete is firing off just fine but success is always false.



      Here is what I have on the server:



      public FineUploaderResult GetFiles(string type)
      {
      List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

      JObject json = new JObject();

      if ( documents != null && documents.Count > 0 )
      {
      string jsonString = JsonConvert.SerializeObject(documents);

      jsonString = jsonString.TrimStart(new char { '[' }).TrimEnd(new char { ']' });
      json = JObject.Parse(jsonString);
      }
      return new FineUploaderResult(true, json);


      }



      Am I not returning the proper thing? Here's the constructor for FineUploader Result in case that helps.



      public FineUploaderResult(bool success, object otherData = null, string error = null, bool? preventRetry = null)
      {
      _success = success;
      _error = error;
      _preventRetry = preventRetry;

      if (otherData != null)
      _otherData = JObject.FromObject(otherData);
      }


      Any help would be most appreciated.










      share|improve this question















      I've spent too much time on this feature already. I've read the documentation, I've searched Stackoverflow. The problem I'm having is that I always get success = false and of course no files are loaded. Documentation says if it has a problem parsing any item in the response but I'm at a loss as to what I'm doing wrong.



      Here is what my server returns in response to the Inital Files request:



      {{
      "uuid": "3377cc66-51d2-4e80-a695-f9018e379b7b",
      "path": "~/UploadedFiles/6f633f07-b23a-43f1-8256-f0dfe9fc9abb",
      "originalFilename": "Cut Offs.png",
      "name": "636785647541018142.png",
      "size": null,
      "thumbnailUrl": null
      }}


      On the client side I am able to retrieve each of these properties just fine. Thinking that perhaps it was choking on something else I reduced it down to just the uuid and the name as those are the only ones required but I got the same result. It didn't work and the success parameter comes in as false.



      The sessionRequestComplete is firing off just fine but success is always false.



      Here is what I have on the server:



      public FineUploaderResult GetFiles(string type)
      {
      List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

      JObject json = new JObject();

      if ( documents != null && documents.Count > 0 )
      {
      string jsonString = JsonConvert.SerializeObject(documents);

      jsonString = jsonString.TrimStart(new char { '[' }).TrimEnd(new char { ']' });
      json = JObject.Parse(jsonString);
      }
      return new FineUploaderResult(true, json);


      }



      Am I not returning the proper thing? Here's the constructor for FineUploader Result in case that helps.



      public FineUploaderResult(bool success, object otherData = null, string error = null, bool? preventRetry = null)
      {
      _success = success;
      _error = error;
      _preventRetry = preventRetry;

      if (otherData != null)
      _otherData = JObject.FromObject(otherData);
      }


      Any help would be most appreciated.







      javascript c# fine-uploader






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 '18 at 21:59

























      asked Nov 23 '18 at 16:42









      Lord Shaedow

      12




      12
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Got it figured out. What I was returning wasn't what I should have been. I was using that FineUploaderResult class but I don't believe I should have been. So I replaced all that json string and serialize and convert stuff to something far more simple and it worked. Here's what I have on the server now:



          public ActionResult GetFiles(string type)
          {
          List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

          return Json(documents, JsonRequestBehavior.AllowGet);
          }


          And this works just fine.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450321%2fhaving-trouble-getting-fineuploaders-initial-file-list-feature-working%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Got it figured out. What I was returning wasn't what I should have been. I was using that FineUploaderResult class but I don't believe I should have been. So I replaced all that json string and serialize and convert stuff to something far more simple and it worked. Here's what I have on the server now:



            public ActionResult GetFiles(string type)
            {
            List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

            return Json(documents, JsonRequestBehavior.AllowGet);
            }


            And this works just fine.






            share|improve this answer


























              0














              Got it figured out. What I was returning wasn't what I should have been. I was using that FineUploaderResult class but I don't believe I should have been. So I replaced all that json string and serialize and convert stuff to something far more simple and it worked. Here's what I have on the server now:



              public ActionResult GetFiles(string type)
              {
              List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

              return Json(documents, JsonRequestBehavior.AllowGet);
              }


              And this works just fine.






              share|improve this answer
























                0












                0








                0






                Got it figured out. What I was returning wasn't what I should have been. I was using that FineUploaderResult class but I don't believe I should have been. So I replaced all that json string and serialize and convert stuff to something far more simple and it worked. Here's what I have on the server now:



                public ActionResult GetFiles(string type)
                {
                List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

                return Json(documents, JsonRequestBehavior.AllowGet);
                }


                And this works just fine.






                share|improve this answer












                Got it figured out. What I was returning wasn't what I should have been. I was using that FineUploaderResult class but I don't believe I should have been. So I replaced all that json string and serialize and convert stuff to something far more simple and it worked. Here's what I have on the server now:



                public ActionResult GetFiles(string type)
                {
                List<FormDocument> documents = (List<FormDocument>) Session["IVRFiles"];

                return Json(documents, JsonRequestBehavior.AllowGet);
                }


                And this works just fine.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 26 '18 at 14:23









                Lord Shaedow

                12




                12






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450321%2fhaving-trouble-getting-fineuploaders-initial-file-list-feature-working%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Lallio

                    Futebolista

                    Jornalista