In simple words, Client will give image PATH in my textarea all those images should be saved in my server DB. Please give some code or idea to achieve this.
Note: Client may put more than one image URL in the textbox. I want to send all the images to the server.
You should tell us ,which clint are you useing.And if there is any framwork,like struts or others.
Related
One of our core system has been integrated with a mobile app recently where we need to share images which are kept in our repository to Mobile app which is residing in another server in the same network. When we analysed solution
Send image as byte[] over the api which is getting used to call
Host image in one of the container we are running and share the image url over api
Which one is the right approach to go on with, or is there any other approach on which we can have a better solution ?
1.Upload image into server using mutipart.
2.Save image into server and make the path of it.
3.You can use then anywhere this byte of path.
Hope it helps
Hi and thanks in advance,
So I have a program which already creates a socket and can send strings both ways between the server and client using UDP.
However, I need to ask something before I continue with trying to send a file (specifically a text file) over my connection.
Is there a way to physically send an actual file over the connection as apposed to simply sending the files contents, or does sending it contents count as sending the files itself?
I just want to make sure on this before I continue with my program.
Thank you.
A file is not a physical object. It is more an idea of interpreting your disks magnetical (or electrical) state.
A "file" is mainly its content. There is some additional information like permissions, owner, last edit date and so on. But I assume that you don't want to send these information.
I have no idea what the specific goal is you are trying to achieve but it is safe to say, that for most applications it is perfectly fine to think of the contents of a file when saying "file".
I am creating an authentication system where I get some value( let us say "x") after processing the android application. I want to send the value "x" to the server where I have a java file and it needs to be run on the server end(may be using php by passing the argument as the value "x"). After running, I need the output to be sent back to the android device to display it.
Leads how to implement such short structure will help me complete the system.
You need to create a class that extends AsyncTask, and then use your php source that u would normally use for login. Here's a link that might help you out: Android, PHP authentication
Try using HTML request. I am not sure how is this implemented. Any one can comment regarding it.
I have a requirement to load big images into chrome browser, in pieces from the server and after it finishes downloading the file completely, if the user wants to look at the file again, then the browser should load it from its cache.
I have done the following to achieve this:
I have written a HTML file and I will be displaying the big image using 'img' tag.
Whenever the user requests for the image file, I'll make a HEAD request to the server enquiring about the content-length and last-modified-date.
The server replies back with the information based on the request and I divide the size of the file into 10 pieces and then make 10 sequential requests to fetch the image file. (Using for loop).
After chrome downloads the entire file and the next time user wants to look at the file, then I am making chrome to send If-Modified-Since query to the server.
If the server responds back with the code 304, then chrome will understand that it has to fetch the file from its cache.
I am facing the following problems:
1. I am getting about 100 bytes per response. Where should I store it and how should I make my img tag understand that it the client is still downloading the file.3
2. How should I recognize the file from the pool of files present in chrome's cache ?
3. The next time someone comes to view the same image, from where should I display the content from ?
Please Help. Can anyone also provide me with some example code or a link to some sample code.
Thanks and Regards,
Akshay Sahu
I got the way to perform this operation.
I am downloading all the bytes of a file in range and using File API of HTML 5 I am creating a file in the user HDD. Therefore, experiencing a complete resume download experience.
Thanks and Regards,
Akshay Sahu.
I am trying to developer an Android application which allows to capture pictures with the camera, and send the pictures to a Java server.
I don't need the picture after, so I do not need to store it in the phone locally.
I was able to successfully to transfer simple text from client to server, but I'm having problems with images.
What do I need to do to be able to send images from the Android client, and should anything special be made in the server apart from what it is doing now?
Solution is to use http request with MultipartEntity.