Symfony uploaded files not reading on azure












1















I have 2 questions.



I have deployed a Symfony 3.4 app on Azure MySQL + PHP web app. I have some forms where user can upload files. images, pdfs etc.



First Question:



When I deployed site I had 300+ files in my symfony app upload directory and I was not able to upload files from the forms. When I logged into Azure I found an error there which is.



ERROR

There are 349 items in this directory, but maxViewItems is set to 299. You
can increase maxViewItems by setting it to a larger value in localStorage.


So I removed all the images and tried to upload the image again and got success in uploading image. So how can I remove the localStorage limit from azure?.



Second Question:



The uploaded images are not appearing on website. how can I show them on website?



My upload directory is



/web/uploads/media/default/0001/01/


Here I am uploading image from forms.










share|improve this question



























    1















    I have 2 questions.



    I have deployed a Symfony 3.4 app on Azure MySQL + PHP web app. I have some forms where user can upload files. images, pdfs etc.



    First Question:



    When I deployed site I had 300+ files in my symfony app upload directory and I was not able to upload files from the forms. When I logged into Azure I found an error there which is.



    ERROR

    There are 349 items in this directory, but maxViewItems is set to 299. You
    can increase maxViewItems by setting it to a larger value in localStorage.


    So I removed all the images and tried to upload the image again and got success in uploading image. So how can I remove the localStorage limit from azure?.



    Second Question:



    The uploaded images are not appearing on website. how can I show them on website?



    My upload directory is



    /web/uploads/media/default/0001/01/


    Here I am uploading image from forms.










    share|improve this question

























      1












      1








      1








      I have 2 questions.



      I have deployed a Symfony 3.4 app on Azure MySQL + PHP web app. I have some forms where user can upload files. images, pdfs etc.



      First Question:



      When I deployed site I had 300+ files in my symfony app upload directory and I was not able to upload files from the forms. When I logged into Azure I found an error there which is.



      ERROR

      There are 349 items in this directory, but maxViewItems is set to 299. You
      can increase maxViewItems by setting it to a larger value in localStorage.


      So I removed all the images and tried to upload the image again and got success in uploading image. So how can I remove the localStorage limit from azure?.



      Second Question:



      The uploaded images are not appearing on website. how can I show them on website?



      My upload directory is



      /web/uploads/media/default/0001/01/


      Here I am uploading image from forms.










      share|improve this question














      I have 2 questions.



      I have deployed a Symfony 3.4 app on Azure MySQL + PHP web app. I have some forms where user can upload files. images, pdfs etc.



      First Question:



      When I deployed site I had 300+ files in my symfony app upload directory and I was not able to upload files from the forms. When I logged into Azure I found an error there which is.



      ERROR

      There are 349 items in this directory, but maxViewItems is set to 299. You
      can increase maxViewItems by setting it to a larger value in localStorage.


      So I removed all the images and tried to upload the image again and got success in uploading image. So how can I remove the localStorage limit from azure?.



      Second Question:



      The uploaded images are not appearing on website. how can I show them on website?



      My upload directory is



      /web/uploads/media/default/0001/01/


      Here I am uploading image from forms.







      php azure symfony azure-web-sites






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 13 '18 at 18:15









      Owais AslamOwais Aslam

      1,1441926




      1,1441926
























          3 Answers
          3






          active

          oldest

          votes


















          1














          There is a blog explained the reason of this issue that was caused by the Kudu Service Web code, and you can refer to and try to fix it via the solutions below.



          Here is two solutions can help fixing it.




          1. Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of MAX_VIEW_ITEMS via window.localStorage['maxViewItems'] = 350.

          2. Generally on Azure for Webapp, it recommend to store and access a lot of asset files via Azure Blob Storage, please refer to the offical document for PHP to know how to use it. Meanwhile, for storing & fetching the metadata of asset file like filename or path, you can use Azure Table Storage.






          share|improve this answer
























          • Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

            – Owais Aslam
            Nov 16 '18 at 10:41











          • @OwaisAslam Sure!

            – Jay Gong
            Nov 16 '18 at 14:59



















          0














          if you are using chrome browser, go to your website




          1. open developer tools (F12)

          2. in the console, run window.localStorage['maxViewItems'] = 350






          share|improve this answer































            0














            For my second question. The issue was in my web.config file and I fixed it by adding a rule to allow file types as follow.



                <rule name="RewriteAssetsToPublic" stopProcessing="true">
            <match url="^(.*)(.css|.woff|.woff2|.tff|.js|.jpg|.png|.gif|.ico|.pdf|.jpeg)$" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
            </conditions>
            <action type="Rewrite" url="web/{R:0}" />
            </rule>


            And my this issue solved all files are being upload.






            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%2f53287197%2fsymfony-uploaded-files-not-reading-on-azure%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              There is a blog explained the reason of this issue that was caused by the Kudu Service Web code, and you can refer to and try to fix it via the solutions below.



              Here is two solutions can help fixing it.




              1. Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of MAX_VIEW_ITEMS via window.localStorage['maxViewItems'] = 350.

              2. Generally on Azure for Webapp, it recommend to store and access a lot of asset files via Azure Blob Storage, please refer to the offical document for PHP to know how to use it. Meanwhile, for storing & fetching the metadata of asset file like filename or path, you can use Azure Table Storage.






              share|improve this answer
























              • Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

                – Owais Aslam
                Nov 16 '18 at 10:41











              • @OwaisAslam Sure!

                – Jay Gong
                Nov 16 '18 at 14:59
















              1














              There is a blog explained the reason of this issue that was caused by the Kudu Service Web code, and you can refer to and try to fix it via the solutions below.



              Here is two solutions can help fixing it.




              1. Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of MAX_VIEW_ITEMS via window.localStorage['maxViewItems'] = 350.

              2. Generally on Azure for Webapp, it recommend to store and access a lot of asset files via Azure Blob Storage, please refer to the offical document for PHP to know how to use it. Meanwhile, for storing & fetching the metadata of asset file like filename or path, you can use Azure Table Storage.






              share|improve this answer
























              • Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

                – Owais Aslam
                Nov 16 '18 at 10:41











              • @OwaisAslam Sure!

                – Jay Gong
                Nov 16 '18 at 14:59














              1












              1








              1







              There is a blog explained the reason of this issue that was caused by the Kudu Service Web code, and you can refer to and try to fix it via the solutions below.



              Here is two solutions can help fixing it.




              1. Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of MAX_VIEW_ITEMS via window.localStorage['maxViewItems'] = 350.

              2. Generally on Azure for Webapp, it recommend to store and access a lot of asset files via Azure Blob Storage, please refer to the offical document for PHP to know how to use it. Meanwhile, for storing & fetching the metadata of asset file like filename or path, you can use Azure Table Storage.






              share|improve this answer













              There is a blog explained the reason of this issue that was caused by the Kudu Service Web code, and you can refer to and try to fix it via the solutions below.



              Here is two solutions can help fixing it.




              1. Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of MAX_VIEW_ITEMS via window.localStorage['maxViewItems'] = 350.

              2. Generally on Azure for Webapp, it recommend to store and access a lot of asset files via Azure Blob Storage, please refer to the offical document for PHP to know how to use it. Meanwhile, for storing & fetching the metadata of asset file like filename or path, you can use Azure Table Storage.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 15 '18 at 8:51









              Jay GongJay Gong

              8,6951512




              8,6951512













              • Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

                – Owais Aslam
                Nov 16 '18 at 10:41











              • @OwaisAslam Sure!

                – Jay Gong
                Nov 16 '18 at 14:59



















              • Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

                – Owais Aslam
                Nov 16 '18 at 10:41











              • @OwaisAslam Sure!

                – Jay Gong
                Nov 16 '18 at 14:59

















              Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

              – Owais Aslam
              Nov 16 '18 at 10:41





              Actually I didn't check this answer yet because I removed all the files from that directory. I'll check it when I'll face this issue again and If it will be helpful I'll accept it. :)

              – Owais Aslam
              Nov 16 '18 at 10:41













              @OwaisAslam Sure!

              – Jay Gong
              Nov 16 '18 at 14:59





              @OwaisAslam Sure!

              – Jay Gong
              Nov 16 '18 at 14:59













              0














              if you are using chrome browser, go to your website




              1. open developer tools (F12)

              2. in the console, run window.localStorage['maxViewItems'] = 350






              share|improve this answer




























                0














                if you are using chrome browser, go to your website




                1. open developer tools (F12)

                2. in the console, run window.localStorage['maxViewItems'] = 350






                share|improve this answer


























                  0












                  0








                  0







                  if you are using chrome browser, go to your website




                  1. open developer tools (F12)

                  2. in the console, run window.localStorage['maxViewItems'] = 350






                  share|improve this answer













                  if you are using chrome browser, go to your website




                  1. open developer tools (F12)

                  2. in the console, run window.localStorage['maxViewItems'] = 350







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 14 '18 at 15:50









                  mohamed jebrimohamed jebri

                  1019




                  1019























                      0














                      For my second question. The issue was in my web.config file and I fixed it by adding a rule to allow file types as follow.



                          <rule name="RewriteAssetsToPublic" stopProcessing="true">
                      <match url="^(.*)(.css|.woff|.woff2|.tff|.js|.jpg|.png|.gif|.ico|.pdf|.jpeg)$" />
                      <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                      </conditions>
                      <action type="Rewrite" url="web/{R:0}" />
                      </rule>


                      And my this issue solved all files are being upload.






                      share|improve this answer




























                        0














                        For my second question. The issue was in my web.config file and I fixed it by adding a rule to allow file types as follow.



                            <rule name="RewriteAssetsToPublic" stopProcessing="true">
                        <match url="^(.*)(.css|.woff|.woff2|.tff|.js|.jpg|.png|.gif|.ico|.pdf|.jpeg)$" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        </conditions>
                        <action type="Rewrite" url="web/{R:0}" />
                        </rule>


                        And my this issue solved all files are being upload.






                        share|improve this answer


























                          0












                          0








                          0







                          For my second question. The issue was in my web.config file and I fixed it by adding a rule to allow file types as follow.



                              <rule name="RewriteAssetsToPublic" stopProcessing="true">
                          <match url="^(.*)(.css|.woff|.woff2|.tff|.js|.jpg|.png|.gif|.ico|.pdf|.jpeg)$" />
                          <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                          </conditions>
                          <action type="Rewrite" url="web/{R:0}" />
                          </rule>


                          And my this issue solved all files are being upload.






                          share|improve this answer













                          For my second question. The issue was in my web.config file and I fixed it by adding a rule to allow file types as follow.



                              <rule name="RewriteAssetsToPublic" stopProcessing="true">
                          <match url="^(.*)(.css|.woff|.woff2|.tff|.js|.jpg|.png|.gif|.ico|.pdf|.jpeg)$" />
                          <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                          </conditions>
                          <action type="Rewrite" url="web/{R:0}" />
                          </rule>


                          And my this issue solved all files are being upload.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 16 '18 at 18:42









                          Owais AslamOwais Aslam

                          1,1441926




                          1,1441926






























                              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.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287197%2fsymfony-uploaded-files-not-reading-on-azure%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

                              Full-time equivalent

                              Bicuculline

                              さくらももこ