Solved

upload images

Posted on 2012-04-06
2
264 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses how to create an extensible mechanism for linked drop downs.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

929 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now