Solved

upload images

Posted on 2012-04-06
2
267 Views
Last Modified: 2012-06-11
Hello I have been using php and imagemagick to upload images and have been successful with it.   However I would like to make my users experience better and use an ajax call to upload them to the form before submitting.  I have seen some examples out there but I do not understand a couple of things.  If I upload an image to a file and for some reason the user decides to not submit their form then I have an image in a folder that is not tied to a database record. I do not really want the code I just want to know what steps are being used to get it done. Thanks  Any suggestions would be appreciated.
0
Comment
Question by:Luey
2 Comments
 
LVL 7

Accepted Solution

by:
designatedinitializer earned 500 total points
ID: 37818019
I have had the same doubts/questions myself.
I solved that problem (and a couple of others at the same time) by writing a script that runs some janitor functions.
From time to time, it searches the uploads directory for images that are not in the database.
It also checks for duplicate files, running a filename check plus a bit-by-bit check.
This keeps the site lean and clean.
0
 

Author Comment

by:Luey
ID: 37818033
I had those same thoughts and I guess I can go there if need be.  I will let this post ride for a day to see if anyone has any other cool solutions if not you win. Thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question