This discussion is related to the
FileUpload addon.
This is primarily a bugfix release.
Changes:
- Fix to ensure comments always display their attached files
- Fix to per-page caching
- Removed DOM
#id dependence, allowing the EDIT functionality to work as intended
- Display current file list when editing the first post of a discussion
- Prevent lost files when uploading several at a time
Features:
- Allow file deletes
- Clean up orphan files when discussions or comments are deleted
Let me know if there are any bugs!
Comments
I'm sure you are already aware of some things that are still not quite right yet, but I'll mention them anyway :-)
When I edit a post with attachments, the attachments are not listed in the edit view. I can add new attachments and when viewed in the discussion, they will appear in the list of attachments togheter with the rest.
I can add the same file several times. Not sure if that's a bug or a feature.
When posting a question (starting a thread) with multiple attachments the last attachment will not be shown in the list when viewing the post/thread. Try adding 2 attachments and only one will appear, 3 attachments and only 2 will appear.
I'm using Vanilla 2.0.9, FileUpload 1.2 on a MAMP installation.
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
Minor bugfixes as per the previous post in this thread.
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
Thanks Tim!
With the following js error
Erreur : $("div.Attachments a.DeleteFile").popup is not a function
Fichier Source : http://www.*****.fr/forum/plugins/FileUpload/js/fileupload.js?v=2.0.9
Ligne : 86
The latest version of FileUpload does not seem to be backwards compatible for attachments uploaded under v1.1?
This seems to be because the method for calculating file storage paths has changed in function FindLocalMediaFolder from in v1.1:
$FolderID = $UserID % 20;
$ReturnArray = array('FileUpload',$FolderID,$UserID);
to v1.2.1:
$FolderID = $MediaID % $DispersionFactor;
$ReturnArray = array('FileUpload',$FolderID);
Is there any easy way of moving files that have been already uploaded to the new directory structure format?
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
For example if I upload, file.jpg it shows up and downloads as file.jpg.jpg
or if it's example.zip it becomes example.zip.zip
very odd.
<td><img src="<?php echo Url("/discussion/download/{$Media->MediaID}/{$Media->Name}"); ?>"><?php echo $Media->Name; ?>/></td>
Hope the proper inline images solution will come soon, but this will suffice till then.
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
http://github.com/vanillaforums/Garden/commit/113b000363f9ebe692b9f769db21a544594de825
Could you fix it ?
Line 13 of what file?
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
<td><img class='uploadpic' src="<?php echo Url("/discussion/download/{$Media->MediaID}/{$Media->Name}"); ?>" /><a href='<?php echo Url("/discussion/download/{$Media->MediaID}/{$Media->Name}"); ?>'><?php echo $Media->Name; ?></a></td>
It's basically a fixed version of what the guy above proposed.
In my fileupload.css I also added
div.Attachments .uploadpic {max-width:500px;}
To make the images not overflow
Now I just need to figure out how to allow users to delete their own uploads...