Symfony uploaded files not reading on azure
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
add a comment |
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
add a comment |
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
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
php azure symfony azure-web-sites
asked Nov 13 '18 at 18:15
Owais AslamOwais Aslam
1,1441926
1,1441926
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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.
- Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of
MAX_VIEW_ITEMS
viawindow.localStorage['maxViewItems'] = 350
. - 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.
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
add a comment |
if you are using chrome browser, go to your website
- open developer tools (F12)
- in the console, run window.localStorage['maxViewItems'] = 350
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
- Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of
MAX_VIEW_ITEMS
viawindow.localStorage['maxViewItems'] = 350
. - 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.
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
add a comment |
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.
- Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of
MAX_VIEW_ITEMS
viawindow.localStorage['maxViewItems'] = 350
. - 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.
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
add a comment |
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.
- Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of
MAX_VIEW_ITEMS
viawindow.localStorage['maxViewItems'] = 350
. - 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.
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.
- Like as @mohamed-jebri said, to update your Javascript code used in your page, and to change the value of
MAX_VIEW_ITEMS
viawindow.localStorage['maxViewItems'] = 350
. - 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.
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
add a comment |
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
add a comment |
if you are using chrome browser, go to your website
- open developer tools (F12)
- in the console, run window.localStorage['maxViewItems'] = 350
add a comment |
if you are using chrome browser, go to your website
- open developer tools (F12)
- in the console, run window.localStorage['maxViewItems'] = 350
add a comment |
if you are using chrome browser, go to your website
- open developer tools (F12)
- in the console, run window.localStorage['maxViewItems'] = 350
if you are using chrome browser, go to your website
- open developer tools (F12)
- in the console, run window.localStorage['maxViewItems'] = 350
answered Nov 14 '18 at 15:50
mohamed jebrimohamed jebri
1019
1019
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 16 '18 at 18:42
Owais AslamOwais Aslam
1,1441926
1,1441926
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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