Uploaded files not being deleted from server when record deleted

Has anyone found this to be an issue also?

I have a news app that the admin uploads a file
When you delete the file uploaded, it doesn’t actually delete the file on the server

Thoughts??

Kevin

Hello Kevin,

That is actually the default behavior of ScriptCase uploaded files.

If you want those files to be deleted also, you will have to create a routine on your applications to delete the file when the record is deleted.

regards,
Bernhard Bernsmann

ok I have the record being deleted when you delete the entire record.
But there is a check box next to the input box that says delete this record.
I click on it and it doesnt delete the file ( and using an ONDELETE event to delete the file.

I cannot find a way of hiding the checkbox and delete this file.
How do I delete the file when I check the box?

kevin

Hello Kevin,

You will delete the file from that record - and not the server - by checking that checkbox. For instance, let’s say that a user uploaded the wrong file, he goes to an existing record on your form and deletes the file from that record without having to delete the entire record.

regards,
Bernhard Bernsmann

I understand that, but how do you delete it from the server?

I made it so you can delete he file from the server if you delete the entire record.

But if someone check the checkbox the file stays on the server

Unacceptable
either show me how delete the file on he server or show me how to hide the checkbox and delete this record wording

Kevin

Hello Kevin,

ScriptCase doesn’t delete the file from your server, because a few customers rather keep the file instead of deleting it. Obviously there are cases that those deleted record files have no use to the system admins (just like in your case).

If you have no desire on keeping those files, you should create a routine to delete those files.

See: http://stackoverflow.com/questions/2371408/how-to-delete-a-file-via-php

It explains how you can delete files. I will also search for a topic on our brazilian forum that explains step by step how to delete files after a record id deleted.

regards,
Bernhard Bernsmann

Does anyone actually read the posts?

I again stated that I have already made it do the file is deleted when you delete the record

But if the someone deletes the file after attaching the to the record

How can I delete the file then or hide the checkbox??

Kevin