Web API needed or not?!
-
Greetings, I am working on a website back end and I am using Bootstrap and jQuery to handle the pages layout and the user interaction. However, I need to make some read/writing at the server side (i.e., saving pictures that will be displayed on the front end and updating data within the database) my question is do I have to implement a Web API to handle such operation reading/writing to the server or there is a way for doing that through using jQuery or Javascript only?!
-
Greetings, I am working on a website back end and I am using Bootstrap and jQuery to handle the pages layout and the user interaction. However, I need to make some read/writing at the server side (i.e., saving pictures that will be displayed on the front end and updating data within the database) my question is do I have to implement a Web API to handle such operation reading/writing to the server or there is a way for doing that through using jQuery or Javascript only?!
javascript runs on the client so it's not possible to use it to store files etc on the server.
-
javascript runs on the client so it's not possible to use it to store files etc on the server.
I mean is there a way that enable javascript or jQuery to send something like a request to a specific server to store/retrieve data or I must do this through a Web API. Sorry I am new to web development
-
I mean is there a way that enable javascript or jQuery to send something like a request to a specific server to store/retrieve data or I must do this through a Web API. Sorry I am new to web development
Web API is just a generic term for something on the server that listens to requests, so if there is an API that can accept your data and do something with it then you can use jQuery to send data to that API. The only problem is if it is files you are sending as javascript can't read the local file system. For that you'll need to use html file api if the browser supports it.
-
Web API is just a generic term for something on the server that listens to requests, so if there is an API that can accept your data and do something with it then you can use jQuery to send data to that API. The only problem is if it is files you are sending as javascript can't read the local file system. For that you'll need to use html file api if the browser supports it.
I am already using HTML file api to read files from local system and those file(s) are simply photo(s) which the client will choose to use it to be displayed on the front-end banners(s). Now I need to send those photo(s) I've read to the server to be stored within a specific folder there and I do not know what I have to do for that even if I have a Web API (ASP.NET Web API) that accepts data sent to it then doing the storing functionality how can I send the data to those method(s) within the Web API I mean the jQuery get, post, and getJson methods need a URL for the Web API so do I have to write the IP address of the server (which I do not know in advance) in this URL or I can use something like this ./myapi/mycontroller to call the methods within my Web API?!!!