d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Question About Uploading To A Site?
Add Reply New Topic New Poll
Member
Posts: 9,546
Joined: May 29 2006
Gold: 326.00
Apr 5 2013 09:41am
How hard would it be to code a html or whatever is needed to essentially upload multiple files to a server without having access to the ftp. Something similar to photobucket, imgur etc? Having the upload button the main page for anyone to use and attaching x # of files?

Will pay someone to pm me about it and if possible give me a simple sample of it.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 5 2013 11:17am
https://www.google.com/search?q=html+file+upload

It's not difficult. Plenty of samples in there.

This post was edited by carteblanche on Apr 5 2013 11:18am
Member
Posts: 9,546
Joined: May 29 2006
Gold: 326.00
Apr 5 2013 11:30am
Quote (carteblanche @ Apr 5 2013 12:17pm)
https://www.google.com/search?q=html+file+upload

It's not difficult. Plenty of samples in there.


thanks but i actually need it in javascript/mysql or what not. I mistyped my initial post

This post was edited by Edrizl on Apr 5 2013 11:30am
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Apr 5 2013 11:40am
use php to encode them in base64, then store them in sql database.

This example will get all the images from the path you specify.
Code
foreach(glob('./pathtoimages/*.jpg') as $filename){
    $imageData = file_get_contents($filename);
    $encodedImage = base64_encode($imageData);
    //store encodedImage in sql database as BLOB
}


This post was edited by labatymo on Apr 5 2013 11:42am
Member
Posts: 9,546
Joined: May 29 2006
Gold: 326.00
Apr 5 2013 11:47am
Quote (labatymo @ Apr 5 2013 12:40pm)
use php to encode them in base64, then store them in sql database.

This example will get all the images from the path you specify.
Code
foreach(glob('./pathtoimages/*.jpg') as $filename){
    $imageData = file_get_contents($filename);
    $encodedImage = base64_encode($imageData);
    //store encodedImage in sql database as BLOB
}


pm'd a question :) not quite what i needed but something similar i believe.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll