4

Basically my problem is that I need to create a web page for a placement project. this webpage should allow any user to upload either photos or documents into the website and be viewed by any user. a bit like Facebook upload facility.

Does anyone know what will be the best way to go about this, can anyone make any recommendations on how I should go about this. Shall I use JQuery or just pure Javascript.

Any advice or help would be greatly appreciated.

Kind Regards,

Robi Haque
  • 53
  • 1
  • 1
  • 3

2 Answers2

2

So i had some time and i looked at w3schools PHP 5 file upload. The easiest way is to add<form action="upload.php" method="post" enctype="multipart/form-data">     Select image to upload:     <input type="file" name="fileToUpload" id="fileToUpload">     <input type="submit" value="Upload Image" name="submit"> </form> in body of your index.html and create a php file called upload.php. In this script you have presented the 'base line' of how uploading works and how you can limit upload size and kind .... Just read the comments in the code and you will know what i'm talking about. First set in your php.ini file_uploads = On

I hope it works for you. I don't know the reason why i can't put php code here so view it at https://www.w3schools.com/php/php_file_upload.asp the file on server won't expire anytime soon (maybe in next 10years)

Tim
  • 190
  • 5
  • 19
0

With little searching I found this for you. http://www.roseindia.net/servlets/upload-image.shtml Hope that can point you in the right direction.

How can I upload files asynchronously?

A lot of these same questions have already been asked, searching has never hurt.

Community
  • 1
  • 1
RawMX
  • 3
  • 4