Click here to Skip to main content
14,599,199 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have created an online server at 000webhost, since i am developing an android app for college how can i uppload notes which can be of pdf or ppt or docx type to its server.

Uploading an image file was an easy task how can this be done
and can u please provide both php code and java code for this

What I have tried:

Couldnt think of anything . I trieed a video of how to upload large files to web server with some changes in it but it didnt work .
Posted
Updated 2-Sep-17 19:21pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

If you can upload images, you can upload any file: the file is just a stream of bytes as far as the upload is concerned, so you can use the same code to upload any type of file.
The "type" of the file is only relevant when the file is being opened by an application.
   
v2
Comments
chinu1d 3-Sep-17 1:28am
   
Okay i will try .
OriginalGriff 3-Sep-17 2:02am
   
:thumbsup:
chinu1d 3-Sep-17 6:42am
   
I have converted image to bitmap and den sent it to the server how can i do the same for other files it makes no sense?
OriginalGriff 3-Sep-17 7:42am
   
Why? Why convert the image at all? And "sending to the server" it's just sent as a stream of bytes, the server doesn't know (or care) about the content, it just needs the byte data and a filename to save it under.
chinu1d 3-Sep-17 8:34am
   
can you provide code for it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100