SMFHacks.com

Downloads System Pro => Support => Topic started by: Zaphod on March 12, 2021, 11:45:50 am

Title: Edits and category changes zero's file size.
Post by: Zaphod on March 12, 2021, 11:45:50 am

Hi all, I found a niggle when I created a testing download area for testing new game maps (Left for Dead 2 Campaigns). here is the scene:- Maps are uploaded to a testing sub category, those that are played and tested as good are then edited to a different sub-category this is fine except the file-size is now reported as 0 Bytes, a quick workaround is to view the properties of the file in question copy the file-size find the entry in the database and edit the file-size manually. Obviously this is less than desirable, the clean alternative is to re-upload the file when changing the category, the same thing occurs when editing the description of the download. I also suspect that when re-uploading the file it creates a duplicate of the file in the SMF/downloads/0 directory (in my case) when I looked I do see two file entries with identical sizes and suspect one is an orphan.

I haven't deleted the older file in case of you know what.
I did write a query with a counter to move any file in the category id (source) and change the id to category (destination) and zeroing the file count in source and adding the file count to the destination category count so as to match reported files as actual numbers.

Again this will do a clean fix, but is time consuming and I hate messing with a database unless I have to.

I feel the best solution is to have a silent update to the  "edit file option" or not zero the file-size when editing the entry for category changes or spelling error on description etc.

I have used for some time the free version but never maintained it, someone else did that, but due to the large file sizes of Left for Dead 2 campaigns many exceed the php file size limits. What we did in the past was to upload to a local directory via ftp and use the upload url to display file then edit database to show file size.

Love the pro version has many features I love but now do not want to edit things like adding a game screenshot due to the file-size being zeroed.
Title: Re: Edits and category changes zero's file size.
Post by: SMFHacks on March 12, 2021, 01:12:28 pm
Yes that was a bug! A recent issue caused by file upload url filesize changes.

Has been fixed in latest update.
5.0.5a
!Fixed filesize edit bug when editing a file for SMF 2.0 going to zero when no uploads
Title: Re: Edits and category changes zero's file size.
Post by: Zaphod on March 12, 2021, 01:42:48 pm
Thank you :)  :)  :)  :)