Dragon Blade Posted August 3, 2013 Share Posted August 3, 2013 This will only let staff upload images to file images/username. Called this file staff_uploadimage.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now make a file called staff_upload.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 3, 2013 Share Posted August 3, 2013 Your form action is upload.php yet the bottom file is staff_upload.php, you sure that's correct? Quote Link to comment Share on other sites More sharing options...
Dragon Blade Posted August 3, 2013 Author Share Posted August 3, 2013 Sorry about that, changed now :) Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted August 3, 2013 Share Posted August 3, 2013 Ok great!! now what would we do with this? Quote Link to comment Share on other sites More sharing options...
tdowers Posted October 10, 2014 Share Posted October 10, 2014 i think this would be for item images . Quote Link to comment Share on other sites More sharing options...
Sim Posted October 10, 2014 Share Posted October 10, 2014 shouldn't You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. be You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. "size" is in bytes, right? Quote Link to comment Share on other sites More sharing options...
Tangled Posted October 14, 2014 Share Posted October 14, 2014 (edited) so what's your plan for the data base images have to be stored Edited October 14, 2014 by Tangled Quote Link to comment Share on other sites More sharing options...
Sim Posted October 14, 2014 Share Posted October 14, 2014 Who you talking to [MENTION=70383]Tangled[/MENTION]? Quote Link to comment Share on other sites More sharing options...
Tangled Posted October 14, 2014 Share Posted October 14, 2014 Who you talking to [MENTION=70383]Tangled[/MENTION]? oopsie... Dragon Blade I missed putting in the quotes - - - Updated - - - Who you talking to [MENTION=70383]Tangled[/MENTION]? Reason I was asking is because when I was instructed in adding images to items I had to make a column for it in items. And for the username images I had to add a column in users Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 14, 2014 Share Posted October 14, 2014 Not necessarily needs a field in database, if he is only allowing one to be stored in the directory of images/username I take it he is naming the image the username, than just echoing the username field where the image name is echoed.. such <img src="/images/username/".$ir['username'].".png"> OR <img src="/images/username/".$r['username'].".png"> where ever he is echoing the image. Quote Link to comment Share on other sites More sharing options...
Zettieee Posted October 15, 2014 Share Posted October 15, 2014 Sniko has a mod like this. He also posted it up for free (it was paid). You should check it out and see how he did it. I'm sure he wouldn't mind you editing his code aslong as he got some credits! :) Quote Link to comment Share on other sites More sharing options...
Tangled Posted October 15, 2014 Share Posted October 15, 2014 Sniko has a mod like this. He also posted it up for free (it was paid). You should check it out and see how he did it. I'm sure he wouldn't mind you editing his code aslong as he got some credits! :) Right that's where I got mine. :) Quote Link to comment Share on other sites More sharing options...
SRB Posted October 15, 2014 Share Posted October 15, 2014 (edited) I got bored, so made an automated AJAX image uploader. Requirements; HTML5 browser that supports the FILE API. Demo: Here Codes (As is, on my site -- I used bootstrap to throw the page together quickly. You shouldn't need any of that.) -- Index.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. -- uploader.js You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Be sure to include jQuery (I used 1.11) for this to work. Edited October 16, 2014 by Guest Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted October 16, 2014 Share Posted October 16, 2014 Be sure to match the js file name at the bottom of your script. The script tag says uploader.js but the file name says upload.js Quote Link to comment Share on other sites More sharing options...
SRB Posted October 16, 2014 Share Posted October 16, 2014 Good spot- you could have edited it for me :P Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted October 16, 2014 Share Posted October 16, 2014 Good spot- you could have edited it for me :P Yeah I could have but I forgot haha my bad. I owe you one Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted October 29, 2014 Share Posted October 29, 2014 [MENTION=50378]Guest[/MENTION] - Demo Website <br /> <b>Warning</b>: move_uploaded_file(uploads/Screen Shot 2014-10-28 at 12.08.58 1.png): failed to open stream: Permission denied in <b>/var/www/html/uploader/index.php</b> on line <b>16</b><br /> <br /> <b>Warning</b>: move_uploaded_file(): Unable to move '/tmp/php81e8Vg' to 'uploads/Screen Shot 2014-10-28 at 12.08.58 1.png' in <b>/var/www/html/uploader/index.php</b> on line <b>16</b><br /> Quote Link to comment Share on other sites More sharing options...
SRB Posted October 29, 2014 Share Posted October 29, 2014 @Guest - Demo Website <br /> <b>Warning</b>: move_uploaded_file(uploads/Screen Shot 2014-10-28 at 12.08.58 1.png): failed to open stream: Permission denied in <b>/var/www/html/uploader/index.php</b> on line <b>16</b><br /> <br /> <b>Warning</b>: move_uploaded_file(): Unable to move '/tmp/php81e8Vg' to 'uploads/Screen Shot 2014-10-28 at 12.08.58 1.png' in <b>/var/www/html/uploader/index.php</b> on line <b>16</b><br /> That's now fixed. Updated the server a couple days back and it seems to have set some file/folder permissions to their defaults =/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.