I am able to add files and upload them to my website correctly however existing images on the server do not display in the table correctly. They show as blank rows in the table. href is 'file:///D:/Hosting/11318691/html/Images/Penguins.jpg' when I believe it should be 'http://www.mywebsite.com/Images/Penguins.jpg'. I am using Godaddy if that matters.
Asked
Active
Viewed 154 times
-1
-
How are we supposed to help you here? – A. Wolff Mar 24 '14 at 12:32
-
Is there some setting in jquery.fileupload.js to control this behavior? Here is a link to my image upload page that shows this behavior. http://www.stuffwant.com/Items/Images Notice if you move your mousepointer to the left side of the rows the image paths are file:///D:/Hosting... Why is jquery.fileupload behaving like this? – user593733 Mar 24 '14 at 12:45
-
I don't know, check plugin DOC. Now if you want more relevant help, provide your relevant code, seems obvious – A. Wolff Mar 24 '14 at 12:46
1 Answers
1
You need to edit the .html file so the images will look like <img src="/Images/Penguins.jpg'" >
rather than <img src="file:///D:/Hosting/11318691/html/Images/Penguins.jpg'" >
. What web editing software are you using?

Chris Gunawardena
- 6,246
- 1
- 29
- 45
-
My site is an ASP.NET MVC Web Application. I am trying to use the file upload controller https://github.com/blackcity/Backload. It is based on the jQuery File Upload Plugin. Go to http://www.stuffwant.com/Items/Images and then view the page source. – user593733 Mar 24 '14 at 13:11
-
-
If you refresh the page does your uploaded image show in the table or do you get a row without the image showing? – user593733 Mar 24 '14 at 13:18
-
-
-
I think the issue is where you take the file path and store it in the database. You have to remove the 'D:/Hosting...' either before saving to database or when displaying. – Chris Gunawardena Mar 24 '14 at 13:23
-
Have a look at this answer: http://stackoverflow.com/questions/5193842/file-upload-asp-net-mvc-3-0 `var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName);` – Chris Gunawardena Mar 24 '14 at 13:24