Delete uploaded/created images?

See all posts Reply

Delete uploaded/created images? new!
by mb, 17 years, 5 months ago
After the images are uploaded and changes are made to them, if one image is not needed anymore, is it possible to delete it from the server using this script?Reply
Re: Delete uploaded/created images? new!
by colin, 17 years, 5 months ago
The images that you create with the class are being written to the server. The purpose of the class is not to delete any images.

If you want to delete some of the images, either you ask the class not to create them in the first place, either you delete them afterwards, in your script.

If you talk about the source image, it is being stored in the PHP temp directory, and will eventually be deleted after a while. Else, you can simply call $foo->clean() to delete the source image.Reply
Re: Delete uploaded/created images? new!
by mb, 17 years, 5 months ago
I understand the purpose of the script is to upload the images (and it's really great for this puprose) and not delete them but I thought the purpose was also to create a photo gallery and the reality is, sometimes you don't want to keep all the files you upload to your gallery. After a while you may want to delete some images.

I thought maybe there was a way to delete uploaded files using "local manipulation" and the clean function.

thanks again.Reply
Re: Delete uploaded/created images? new!
by colin, 17 years, 5 months ago
The class is a low level script to provide functionality to other scripts, such as a gallery script. The class is not meant to be used as-is, it is meant to be a brick in a bigger system. A file goes in, a file (or more) goes out, that's all.

To delete files from a webspace is a feature that goes beyond the scope of the class. I don't intend to add such a feature in the foreseable future. There are some very good gallery scripts around which provide you with the functionality you wantReply
Re: Delete uploaded/created images? new!
by mb, 17 years, 5 months ago
ok, thank you for taking the time to answer. I will probably try to extend the class. I just wanted to make sure it wasn't already possible to do this.Reply