As i'm developing a Web API for angular application i have saved the image in my Web Api project and the project folder structure is below.
Now as i'm trying to get access for the image via browser it doesn't show the image here is a snapshot for it below.
I have tried calling the HTML page of angular like this below.
<img src="http://localhost:4000/Uploads/Profile/057f4ed8-5b52-4ba0-b3ec-ae3b4f4e9baa.jpg" class="img-fluid">
It doesn't work how can i access these images in my other project and also the Web API project is running.
To Enable Static Content go to Window Features then iis
Related
I'm building an Ionic application, I have built 50% of the project, and at first I used the sidemenu template that is auto generated with ionic start MyProject sidemenu, and then I added my own pages and components after that.
In the browser view the app was great, then I deployed my application to an android device, with the deployment being successfully When I start the application I felt that the application was slow, but when I switch to a some view, it took 5-10 seconds to open the new page.
I watched the traffic between the server side and the application, and observed that the application is not switching to the new page until the request is back and the view is rendered!
any help?
Try switching to your views first and then using the ionViewWillEnter() or another built in ionic API for the application lifecycle.
ionViewWillEnter will pull the data everytime the view loads, where
ionViewDidLoad will pull the page on first load only.
ionViewDidLoad() {
console.log('ionViewDidLoad SplashPage');
}
You do not state which version of ionic you are using but in ionic 3 if you create your pages with the terminal using
ionic g page MyPage
It will automatically create the page as a module. This allows for lazy loading. You can read more on it here form ionic's official blog post.
Its hard to say exactly why the view is only loading after it hits the server as you have not added your navigational code. There could be a code block that waits for a server response before pushing to the next page.
If your view is depended on received data from the server then your request should be in a new Promise allowing you to add conditionals for before and/or after the data has been touched.
How to deploy my webpage code to back4app, the code has some web end process.So I have to access my created webpage globally how to achieve that
You have two different ways to upload your webpage code:
1) Using dashboard: Sign in Back4app -> click in your app features -> cloud code -> there is an upload button
2) Using CLI: http://docs.back4app.com/docs/integrations/command-line-interface/
Static files (like html, css, js) should be placed in a folder called "public".
If you want to use Node.js/Express.js application to build a dynamic web-page, you have to create your endpoints in a file called "app.js":
http://docs.back4app.com/docs/integrations/webhosting-back4app/
How to cache a webpage locally on an Android phone with app made by App Inventor? I'm actually making a web browser app for Android and I want it load my website without internet! Please help!!!
Dowload the HTML content of the page and then display it .
WebView mWebView = null;
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("yourhtmlfilepath");
dont forget to add file:/// before path
I'm developing a JSF application which has an image upload function. I'd like to display the uploaded image. The uploading works fine but when I delete the uploaded picture and upload a new one, the old one is displayed in the browser. I typed the link of the picture in the browser but I sill get the old one. I use the same file name and I would not like to change it. How could I refresh it. (without Javascript). I'm using Glassfish Server. (Redeplyoing the application I get the new picture but it isn't a solution for an online system ;))
Thank you.
Redeplyoing the application I get the new picture
Don't store it in the deploy folder by getRealPath() and consorts. Store it outside the deploy folder.
See also:
Uploaded image only available after refreshing the page
I'm using the embedded web browser, and it (the browser) works fine. Can I display a locally stored HTML file in it? The file is in folder 'html'. I am trying it but it does not work - says it cannot find the web page.
My code:
<phone:WebBrowser Name="webBrowser1" Height="467" Source="/html/test.html"/>
To display static content in a browser control, you can "use a WebBrowser control to display static web content that an application has saved into isolated storage using the SaveToString() method".
See: http://msdn.microsoft.com/en-us/library/ff431811(v=vs.92).aspx
Hope this helps you.