Solved

upload images

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

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

759 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

20 Experts available now in Live!

Get 1:1 Help Now