MyBB Community Forums

Full Version: how to modify an attachment using FTP?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i'm a administrator of my MYBB board, lol of course.

i'm renting webhost service from 5webs.net

but the post_max_size is set to 8 MB, and the upload_max_filesize is set to 10 MB.

however i can upload whatever size of files using my FTP account.

so is there any way to add an attachment by hand using FTP?

i was thinking upload a small fake attachment on the board, and then replace it with another file using FTP. but i don't know how to do this...

please help me, i'll appreciate it. thank you
Quote:i was thinking upload a small fake attachment on the board, and then replace it with another file using FTP. but i don't know how to do this...
Sounds like a good plan. Smile

You could use phpMyAdmin to look in the "attachments" table of your database for the row that corresponds to the attachment you want to replace. Copy the value of the "attachname" field (it will be something like "post_15_1152069188.attach") and rename your replacement file to match. Now use your FTP client to upload it to MyBB's uploads directory. It should overwrite the existing file.

One final important step: determine the size of the new file (in bytes) and update the "filesize" field in the database. You may also want to update "filetype" (if the replacement file is a different type) and "filename."
sounds good, thanks, i will try