How to show uploaded images from server(folder) to index page in asp.net webapi? - asp.net-mvc-4

Hi all,
I am working in asp.net webapi. I have uploaded my images and I have optimized these images for three different sizes.
Then I clicked on saved in folder in server(App_Data)(folder) in my application, now I need to
Retrive those images from that folder
Show in my index page like i should get that images back
Show original image
Show the different images on radio button selection
Could you please help me retrieve those pictures from my folder (show dynamically),and help me fetch and show images in index page?
Thanks in advance.

As of above i got idea that actually want to do need to retrive images from folder path right
ok for that need to write method in controller its just simple
public static string Getimage( string url)
{
return url;
}
and make call in your controllers like this
Getimage(uploadedfolders)
uploaded folders means patha of folder which images are stored

Related

Is there any way to save a webpage as a pdf document in flutter web view

I am currently using flutter InAppWebView Plugin. I want to save a web page as a pdf file when the url of the page is given. I have used the printCurrentPage() method of the InAppWebView plugin but it does not return the filepath back to the app after saving the file so that it can be shown in a list view in the app itself. Can anyone help me save the webpage as a pdf and show the saved files as a list view.
I have tried webcontent_converter plugin too but it looses some content of the page like images and icon to include in the pdf file.

Image sitemaps -- list same images on every page?

My website has very few images: 2 versions of the logo, a favicon, and a default user image. They are used on many pages. These images are also referenced from a /publicrelations page.
The website also has an animated image that is only in the background of the landing page, but I don't want this indexed.
When creating the image sitemap, should I
A: only do <url><loc>myurl.com/publicrelations</loc>infoAboutAllTheCommonImages</url>
B: do what is in "A" but for every page (i.e. <loc>urlToSomePage</loc>), even though every page will reference the same images
C: something else?
Thank you
The essence of including an image sitemap is for your image to be visible on the search engine results page. Question is- do you want your favicon and logo on the search results? If NO, forget about the sitemap.
If YES, there's no need to include the same image from every page. It's not relevant to the search results to have identical images. Just choose one.

How to let end user change background image in XPages?

Now I can import some ready made images into the image resources, present them as options to the end-user on the XPage, and then based on their selection, compute the 'style' property to update the background image. But it still doesn't let the user upload their own image as background.
Is there any way that doesn't involve image resource at all? I'm thinking of doing the normal fileupload control. Let the user upload an image as an attachment into a document and then somehow compute the style property by referencing the image in the attachment but I'm not sure how to do that or if that's doable at all.
If you upload the image to a "User Settings" document and also calculate the filename in a field on the document and display these documents in a view sorted by the UserName. Get the path to the document using the logged in Users name and
Calculate the path to the image. The path should look something like this.
database path + name/view/UNID/$File/Filename
If you use a RichText Lite field to store your image and set it to Thumbnail (with no size restrictions), then you can specify a fixed filename (on second tab of properties for field)
You can then reference that attachment with a URL like Fredrick mentions.

Adding Multiple web pages to UIWebview in a Page-Based app

I am working on making a paged app that will load a separate HTML page on each page. I am using the already given example that Apple has provided and rigged it to make the label dissapear and a few other things. Most tutorials I have seen do not cover this idea at all.
I need to be able to make an array of webpages and using one UIWebview display those pages, obviously one HTML file per page. What will be the most efficient way to do this that is up to date with iOS5 or is there a recent tutorial I can follow? Thanks.
Depending on how much data you have you could serialize the HTML data in a single file (such as a plist) or have them as separate files in a directory.
Based on the template you are using, you would
change the view in DataViewController to a UIWebView;
then override the viewControllerAtIndex method in your ModelController and pass the path to your HTML page as the data object;
and finally load the HTML in the viewWillAppear method of your DataViewController.
VoilĂ , here is your tutorial!

Hotlinking: How do I differentiate between an image in a <img> tag versus an image link?

I want to allow partial hotlinking to images on my website. I want to allow a specific site (Reddit) to be able to show an image from my website on their page, but if they click on the link to the image from that site, it should go to an image viewing page, rather than directly the image itself.
For example:
This other website should be able to have this
<img src="http://mySite.com/myImage.jpg"/>
on their page, and it should show the image. However, if they have this:
Link Text
A user who clicks on that link should get redirected to an image viewing page that contains some html, including the image, rather than directly to the image.
I'm trying to achieve this via mod_rewrite. However, those two cases have the same HTTP_REFERER. Is there anyway for my server to differentiate between that?
There is no way to do such thing! but if second site is your you can put optional query string at the end of URL the distinguish between them!