uploaded image wont show. I just get its link from the array/list of other pictures even though I pushed the...
I already append my list item details with express handlebars and they are showing up. The problem is when I want to append the new list item picture as the previous items are having the pictures. Now I will just get the new item details showing up except the picture.
surely it will work with the online pictures but with local loaded images it won't, as I just experienced it.
index.js:
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.post('/addProduct', function(req, res) {
var data = JSON.parse(JSON.stringify(req.body));
console.log(data);
var product = {
picture_Url: "images/fashion_gallery/" + data.pictureUrl,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
console.log(clothes);
res.redirect("/");
});
home.handlebars:
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
<div class="ui-state-highlight ui-corner-all"><strong>
{{#each longSleeve}}
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}<br>
{{this.Price}} : </strong><a href="#">Buy</a>
{{/each}}
</div>
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
javascript node.js express-handlebars
add a comment |
I already append my list item details with express handlebars and they are showing up. The problem is when I want to append the new list item picture as the previous items are having the pictures. Now I will just get the new item details showing up except the picture.
surely it will work with the online pictures but with local loaded images it won't, as I just experienced it.
index.js:
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.post('/addProduct', function(req, res) {
var data = JSON.parse(JSON.stringify(req.body));
console.log(data);
var product = {
picture_Url: "images/fashion_gallery/" + data.pictureUrl,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
console.log(clothes);
res.redirect("/");
});
home.handlebars:
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
<div class="ui-state-highlight ui-corner-all"><strong>
{{#each longSleeve}}
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}<br>
{{this.Price}} : </strong><a href="#">Buy</a>
{{/each}}
</div>
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
javascript node.js express-handlebars
what does console.log(data) in your /addProduct handler output?
– S..
Jan 2 at 2:02
if the data you're submitting follows the same model/format as what you're displaying then you should have an underscore between picture and Url iedata.picture_Url
.
– S..
Jan 2 at 2:04
add a comment |
I already append my list item details with express handlebars and they are showing up. The problem is when I want to append the new list item picture as the previous items are having the pictures. Now I will just get the new item details showing up except the picture.
surely it will work with the online pictures but with local loaded images it won't, as I just experienced it.
index.js:
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.post('/addProduct', function(req, res) {
var data = JSON.parse(JSON.stringify(req.body));
console.log(data);
var product = {
picture_Url: "images/fashion_gallery/" + data.pictureUrl,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
console.log(clothes);
res.redirect("/");
});
home.handlebars:
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
<div class="ui-state-highlight ui-corner-all"><strong>
{{#each longSleeve}}
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}<br>
{{this.Price}} : </strong><a href="#">Buy</a>
{{/each}}
</div>
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
javascript node.js express-handlebars
I already append my list item details with express handlebars and they are showing up. The problem is when I want to append the new list item picture as the previous items are having the pictures. Now I will just get the new item details showing up except the picture.
surely it will work with the online pictures but with local loaded images it won't, as I just experienced it.
index.js:
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.post('/addProduct', function(req, res) {
var data = JSON.parse(JSON.stringify(req.body));
console.log(data);
var product = {
picture_Url: "images/fashion_gallery/" + data.pictureUrl,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
console.log(clothes);
res.redirect("/");
});
home.handlebars:
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
<div class="ui-state-highlight ui-corner-all"><strong>
{{#each longSleeve}}
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}<br>
{{this.Price}} : </strong><a href="#">Buy</a>
{{/each}}
</div>
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
javascript node.js express-handlebars
javascript node.js express-handlebars
edited Jan 3 at 8:48
Oyamasiphula
asked Jan 1 at 23:04
OyamasiphulaOyamasiphula
13
13
what does console.log(data) in your /addProduct handler output?
– S..
Jan 2 at 2:02
if the data you're submitting follows the same model/format as what you're displaying then you should have an underscore between picture and Url iedata.picture_Url
.
– S..
Jan 2 at 2:04
add a comment |
what does console.log(data) in your /addProduct handler output?
– S..
Jan 2 at 2:02
if the data you're submitting follows the same model/format as what you're displaying then you should have an underscore between picture and Url iedata.picture_Url
.
– S..
Jan 2 at 2:04
what does console.log(data) in your /addProduct handler output?
– S..
Jan 2 at 2:02
what does console.log(data) in your /addProduct handler output?
– S..
Jan 2 at 2:02
if the data you're submitting follows the same model/format as what you're displaying then you should have an underscore between picture and Url ie
data.picture_Url
.– S..
Jan 2 at 2:04
if the data you're submitting follows the same model/format as what you're displaying then you should have an underscore between picture and Url ie
data.picture_Url
.– S..
Jan 2 at 2:04
add a comment |
1 Answer
1
active
oldest
votes
I should've used multer and here's my code
index.js
// newly added multer code
var multer = require('multer'),
upload = multer({
dest: 'public/images/fashion_gallery/'
});
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.get('/', (req, res) => {
res.render('home')
});
//route to upload file and get its name
app.post('/projects', upload.single('picture_Url'), (req, res) => {
var data = JSON.parse(JSON.stringify(req.body));
// get file name with multer after uploading it
let file_name = req.file.filename;
var product = {
picture_Url: 'images/fashion_gallery/' + file_name,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
res.redirect("/projects");
});
home.handlebars
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
{{#each longSleeve}}
<div class="ui-state-highlight ui-corner-all"><strong>
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}
<br>
{{this.Price}} : </strong><a href="#">Buy</a>
</div>
{{/each}}
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
<div id="addProductDiv" class="post hide">
<!-- This is the most important part with multer image upload the enctype
part you dont need to forget -->
<form class="" action="/projects" method="post" enctype="multipart/form-data">
<label for="avatar">Choose a file to upload:</label>
<input type="file" id="avatar" name="picture_Url" accept="image/png, image/jpeg">
Type : <select class="brandOptions" name="typeOfCloth">
<option class="placeHolder" value="" selected="true" disabled="">SELECT TYPE</option>
<option value="Cap">Cap</option>
<option value="Long Sleeve">Long Sleeve</option>
</select>
Size : <input type="text" name="size" value="">
Quantity : <input type="number" name="qty" value="">
Price : <input type="text" name="price" value="">
<input class="button" type="submit" name="" value="Submit">
</form><br>
<input id="back" class="backButton" type="submit" name="" value="Back">
</div>
Is this the answer?
– Archer
Jan 3 at 16:34
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
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%2f53999616%2fuploaded-image-wont-show-i-just-get-its-link-from-the-array-list-of-other-pictu%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
I should've used multer and here's my code
index.js
// newly added multer code
var multer = require('multer'),
upload = multer({
dest: 'public/images/fashion_gallery/'
});
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.get('/', (req, res) => {
res.render('home')
});
//route to upload file and get its name
app.post('/projects', upload.single('picture_Url'), (req, res) => {
var data = JSON.parse(JSON.stringify(req.body));
// get file name with multer after uploading it
let file_name = req.file.filename;
var product = {
picture_Url: 'images/fashion_gallery/' + file_name,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
res.redirect("/projects");
});
home.handlebars
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
{{#each longSleeve}}
<div class="ui-state-highlight ui-corner-all"><strong>
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}
<br>
{{this.Price}} : </strong><a href="#">Buy</a>
</div>
{{/each}}
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
<div id="addProductDiv" class="post hide">
<!-- This is the most important part with multer image upload the enctype
part you dont need to forget -->
<form class="" action="/projects" method="post" enctype="multipart/form-data">
<label for="avatar">Choose a file to upload:</label>
<input type="file" id="avatar" name="picture_Url" accept="image/png, image/jpeg">
Type : <select class="brandOptions" name="typeOfCloth">
<option class="placeHolder" value="" selected="true" disabled="">SELECT TYPE</option>
<option value="Cap">Cap</option>
<option value="Long Sleeve">Long Sleeve</option>
</select>
Size : <input type="text" name="size" value="">
Quantity : <input type="number" name="qty" value="">
Price : <input type="text" name="price" value="">
<input class="button" type="submit" name="" value="Submit">
</form><br>
<input id="back" class="backButton" type="submit" name="" value="Back">
</div>
Is this the answer?
– Archer
Jan 3 at 16:34
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
add a comment |
I should've used multer and here's my code
index.js
// newly added multer code
var multer = require('multer'),
upload = multer({
dest: 'public/images/fashion_gallery/'
});
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.get('/', (req, res) => {
res.render('home')
});
//route to upload file and get its name
app.post('/projects', upload.single('picture_Url'), (req, res) => {
var data = JSON.parse(JSON.stringify(req.body));
// get file name with multer after uploading it
let file_name = req.file.filename;
var product = {
picture_Url: 'images/fashion_gallery/' + file_name,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
res.redirect("/projects");
});
home.handlebars
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
{{#each longSleeve}}
<div class="ui-state-highlight ui-corner-all"><strong>
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}
<br>
{{this.Price}} : </strong><a href="#">Buy</a>
</div>
{{/each}}
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
<div id="addProductDiv" class="post hide">
<!-- This is the most important part with multer image upload the enctype
part you dont need to forget -->
<form class="" action="/projects" method="post" enctype="multipart/form-data">
<label for="avatar">Choose a file to upload:</label>
<input type="file" id="avatar" name="picture_Url" accept="image/png, image/jpeg">
Type : <select class="brandOptions" name="typeOfCloth">
<option class="placeHolder" value="" selected="true" disabled="">SELECT TYPE</option>
<option value="Cap">Cap</option>
<option value="Long Sleeve">Long Sleeve</option>
</select>
Size : <input type="text" name="size" value="">
Quantity : <input type="number" name="qty" value="">
Price : <input type="text" name="price" value="">
<input class="button" type="submit" name="" value="Submit">
</form><br>
<input id="back" class="backButton" type="submit" name="" value="Back">
</div>
Is this the answer?
– Archer
Jan 3 at 16:34
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
add a comment |
I should've used multer and here's my code
index.js
// newly added multer code
var multer = require('multer'),
upload = multer({
dest: 'public/images/fashion_gallery/'
});
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.get('/', (req, res) => {
res.render('home')
});
//route to upload file and get its name
app.post('/projects', upload.single('picture_Url'), (req, res) => {
var data = JSON.parse(JSON.stringify(req.body));
// get file name with multer after uploading it
let file_name = req.file.filename;
var product = {
picture_Url: 'images/fashion_gallery/' + file_name,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
res.redirect("/projects");
});
home.handlebars
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
{{#each longSleeve}}
<div class="ui-state-highlight ui-corner-all"><strong>
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}
<br>
{{this.Price}} : </strong><a href="#">Buy</a>
</div>
{{/each}}
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
<div id="addProductDiv" class="post hide">
<!-- This is the most important part with multer image upload the enctype
part you dont need to forget -->
<form class="" action="/projects" method="post" enctype="multipart/form-data">
<label for="avatar">Choose a file to upload:</label>
<input type="file" id="avatar" name="picture_Url" accept="image/png, image/jpeg">
Type : <select class="brandOptions" name="typeOfCloth">
<option class="placeHolder" value="" selected="true" disabled="">SELECT TYPE</option>
<option value="Cap">Cap</option>
<option value="Long Sleeve">Long Sleeve</option>
</select>
Size : <input type="text" name="size" value="">
Quantity : <input type="number" name="qty" value="">
Price : <input type="text" name="price" value="">
<input class="button" type="submit" name="" value="Submit">
</form><br>
<input id="back" class="backButton" type="submit" name="" value="Back">
</div>
I should've used multer and here's my code
index.js
// newly added multer code
var multer = require('multer'),
upload = multer({
dest: 'public/images/fashion_gallery/'
});
var clothes = [{
picture_Url: "images/fashion_gallery/tshirt.jpg",
Type: "TShirt",
Size: "XS",
Qty: 1,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-cap.JPG",
Type: "Cap",
Size: "M",
Qty: 2,
Price: "R200"
}, {
picture_Url: "images/fashion_gallery/Optimized-long-sleeve.jpg",
Type: "Long Sleeve",
Size: "XL",
Qty: 5,
Price: "R400"
}];
app.get('/', (req, res) => {
res.render('home')
});
//route to upload file and get its name
app.post('/projects', upload.single('picture_Url'), (req, res) => {
var data = JSON.parse(JSON.stringify(req.body));
// get file name with multer after uploading it
let file_name = req.file.filename;
var product = {
picture_Url: 'images/fashion_gallery/' + file_name,
Type: data.typeOfCloth,
Size: data.size,
Qty: data.qty,
Price: data.price
}
clothes.push(product)
res.redirect("/projects");
});
home.handlebars
<div id="tabs-2">
<p>This is just a good Top for mid winter season.</p>
{{#each longSleeve}}
<div class="ui-state-highlight ui-corner-all"><strong>
<img class="ads" src="{{this.picture_Url}}" alt="">
<br>
Quantity : {{this.Qty}}
<br>
{{this.Price}} : </strong><a href="#">Buy</a>
</div>
{{/each}}
<input id="addButton" class="button" type="button" name="" value=" + Add">
</div>
<div id="addProductDiv" class="post hide">
<!-- This is the most important part with multer image upload the enctype
part you dont need to forget -->
<form class="" action="/projects" method="post" enctype="multipart/form-data">
<label for="avatar">Choose a file to upload:</label>
<input type="file" id="avatar" name="picture_Url" accept="image/png, image/jpeg">
Type : <select class="brandOptions" name="typeOfCloth">
<option class="placeHolder" value="" selected="true" disabled="">SELECT TYPE</option>
<option value="Cap">Cap</option>
<option value="Long Sleeve">Long Sleeve</option>
</select>
Size : <input type="text" name="size" value="">
Quantity : <input type="number" name="qty" value="">
Price : <input type="text" name="price" value="">
<input class="button" type="submit" name="" value="Submit">
</form><br>
<input id="back" class="backButton" type="submit" name="" value="Back">
</div>
answered Jan 3 at 16:24
OyamasiphulaOyamasiphula
13
13
Is this the answer?
– Archer
Jan 3 at 16:34
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
add a comment |
Is this the answer?
– Archer
Jan 3 at 16:34
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
Is this the answer?
– Archer
Jan 3 at 16:34
Is this the answer?
– Archer
Jan 3 at 16:34
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
Yes, using multer as one of my nodejs web app dependances to upload and get image name which I can reference in my html or template.
– Oyamasiphula
Jan 4 at 17:48
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%2f53999616%2fuploaded-image-wont-show-i-just-get-its-link-from-the-array-list-of-other-pictu%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
what does console.log(data) in your /addProduct handler output?
– S..
Jan 2 at 2:02
if the data you're submitting follows the same model/format as what you're displaying then you should have an underscore between picture and Url ie
data.picture_Url
.– S..
Jan 2 at 2:04