Updating an image in Media Library causing problems

Cameron Asbury asked on February 13, 2020 23:53

When attempting to use the update button in the media library I am encountering a problem where the image then removes itself from the list, and when attempting to re-upload I am getting error.

"The media file with path 'departments/training/sop/filename.png' already exists in the database. Copy the file to the file system manually or delete the file from the database and perform the upload again."

How do I fix this, and where do I go to delete this database entry?

Thanks!

Cameron

Correct Answer

Mikhail Dervel answered on February 14, 2020 10:19

Hi Cameron. It happens when the row in table [Media_File] exists, but corresponding file doesn't. Please, find the row in [Media_File] and delete it, then you can upload it again

1 votesVote for this answer Unmark Correct answer

Recent Answers


Cameron Asbury answered on February 14, 2020 15:07

Do I need direct access to the database or can I access it from the portal engine?

0 votesVote for this answer Mark as a Correct answer

Mikhail Dervel answered on February 14, 2020 15:10

Yep, you should do it directly in the database.

1 votesVote for this answer Mark as a Correct answer

Cameron Asbury answered on February 14, 2020 15:16

Thanks for your answer! This does pose a problem however that I don't have access to that database, at least currently I'll have to see if I can request it (I'm just a contractor so a lot of things are pretty locked down for me) is there something I can do in the future to avoid this happening? this is the first time it has happened but its happened for 3 files in that folder now. Steps taken were basically just a small modification to a file (increased it's size and removed transparency) or even smaller in that our designer just removed a border here and there and the problem surfaced.

0 votesVote for this answer Mark as a Correct answer

Mikhail Dervel answered on February 14, 2020 15:36

It's difficult to say. You can investigate Event Log and try to find some errors. I think at some time Kentico could create a new record in Media_File, but couldn't create a file in "Media libraries folder"

1 votesVote for this answer Mark as a Correct answer

Cameron Asbury answered on February 14, 2020 15:59

Was able to locate the errors.

There was a PAGENOTFOUND Error when attempting up update it looks like, then you see the full on error that I get after the fact that talks about the database issue.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.