Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-12-09 18:33:38

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Problems with "edit files"

I have several problems with files. Actually I want to update ID #32, but the new file upload stands still. After a longer standstill the following message appears: “I’m sorry. I’m afraid I can’t do that; file file_replace is an unsafe operation”.

I can upload without problems the same PDF (about 40 MB) as ID #33, but that doesn’t help me, I need it in ID #32.

Strange is that file_replace works with other reduced PDF about 1 MB. The file to replace has 40 MB. The maximum file size for uploads in preferences admin is 90 000 000 bytes.

I could delete ID #32. How could I then change in the database ID #33 to ID #32?

Last edited by GugUser (2020-12-09 18:38:42)

Offline

#2 2020-12-09 18:36:37

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Problems with "edit files"

I’m not sure we use the same upload mechanism in file replace, it might still be the ancient one. In which case it can not override php settings (typically 8Mb).

Offline

#3 2020-12-09 18:47:16

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Problems with "edit files"

I could delete ID #32. How could I then change in the database ID #33 to ID #32?

In another case, with the same problem, I wanted to do a rewrite to the current PDF, but RedirectMatch 301 with /file_download/ in the URL seems not to work.

Offline

#4 2020-12-09 18:51:39

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Problems with "edit files"

phpmyadmin or other db tool seems to work for me.

Offline

#5 2020-12-09 18:59:50

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Problems with "edit files"

Can I in phpmyadmin just change the ID value from 33 to 32 or is that problematic?

Offline

#6 2020-12-09 21:49:05

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Problems with "edit files"

GugUser wrote #327388:

Can I in phpmyadmin just change the ID value from 33 to 32 or is that problematic?

I did and have not seen any problem yet.

Offline

#7 2020-12-13 08:20:39

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: Problems with "edit files"

Hi GugUser,

The files in textpattern are stored using their name, you can use an ftp to upload the file with the same name as your ID 33 file and it will be replaced.

Cheers.

Offline

#8 2020-12-13 12:29:23

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Problems with "edit files"

Hi Dragondz

The same name but a different size of data. How would the database update?

Offline

#9 2020-12-13 14:13:05

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: Problems with "edit files"

Hi

After uploading the new file using ftp, go to file tab on txp and hit modify the file then click on save and the new file size is updated. (tested on txp 4.8.1)

Cheers.

Offline

#10 2020-12-13 14:21:17

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Problems with "edit files"

The file size (~50 MB) seems to be a problem. It works with smaller files, but not with the one mentioned and similar.

Offline

Board footer

Powered by FluxBB