Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.


This discussion is related to the Attachments addon.


  • Wow - great extension. I have really learned a lot about vanilla-internals while studying the sources :)

    I have found a little typo near lines 154 and 170, should be MimeType not MineTypes ..
  • I think this is a great extension too, when used in Firefox or IE. But I would still love to hear from you php experts as to why it doesn't work in Safari!
  • Thanks for the great stuff.
    I have a problem with attached file names, but I dont know where this comes from.
    If I try to download a 2-byte-language-file-name file with IE 6, the file name changes into meaningless roman alphabet name without file type extension. For Example, when I try to download a file named "言語生活.ppt" or "参考資料.zip" etc, IE asks me if I save an unkown file "CALDDE5" or "DACNJK4" etc.
    And Safari downloads the file with garbled name + file type extension.
    FF and Opera are good.
    How could i solve this problem? Thank you in advance.
  • @sujang
    Hi, you can change the line #379 of default.php from:
    header('Content-Disposition: attachment; filename="'.$FileName.'"'); to if (eregi('msie', $_SERVER['HTTP_USER_AGENT']))header('Content-Disposition: attachment; filename="'.urlencode($FileName).'"'); else header('Content-Disposition: attachment; filename="'.$FileName.'"');
    Since I haven't Mac to test Safari browser, This may just fix your problem in IE. (Could you tell me the result with safari?)
    // It's test in my forum with UTF-8 encode only, if you using other encode, you may have to use iconv to change $FileName to UTF-8 encode first.
  • Yes, it fixed my problem with IE !
    BIG THANKS SkyBoy !

    In Safari, file name changes into something like ""
    I am using UTF-8 too.

    I am very happy with your help, thanks again.
  • sujang, I don't see how you are getting Attachments to work in Safari, in ANY language! I've tried everything, but it just won't work in Safari. Works perfectly in Firefox and IE though. But when adding a comment and a file attachment in Safari, the comment gets posted by no attachment!
  • JDW, I just mentioned on the downloading problem.
    I cannot upload files using Safari, too. I hope the next update of Attachments will clear this issue.
    I do not know whether Safari handles files in non-standard way or not.
  • Same here. There seems to be a few issues with javascript events. See also

    Sometimes page reloads don't seem to get fired off in Safari so any javascript code waiting on a page reload fails. This affects Attachments as well as deleting comments.
  • I'm afraid this is a rather stupid question, but does attachments work in 1.1.2? I've dropped it in my extensions folder, but can't seem to activate the extension.
  • um, nevermind, i left javascript disabled in web developer. i'm an idiot.
  • quoo, you are not an idiot. It simply is an unfortuate fact that we cannot delete our own posts on this site! If we could, then we could delete our own irrelevant posts, reduce the overall footprint of this forum on Mark's server, and make the forum a cleaner and better place for all of us. And while Vanilla does allow Administrators to allow members to delete posts, there is no timer. Perhaps that is why Mark doesn't allow us to delete our own posts. I think there should be a time limit of something like 48 hours for you to delete your most recent posts. That timer would then prevent naughty folk from deleting ALL their posts, should they ever become disgruntled on a site and wish to wipe all their posts in an attempt to screw up past post relevance. This would really be a nice addition to this forum, and to all our forums.

    But now that I think of it, perhaps better than a "timer" (or something to supplement a timer) would be a requirement to first have any "reply" posts be deleted before you can delete yours. Meaning, if you post two days ago and two people reply to your post, you obviously shouldn't be allowed to delete your post without first having asked to two repliers to delete theirs. Then their posts would not be out of place when your post is deleted. But obviously, something such as this would need to be built into the framework of Vanilla itself, and such is certainly a subject for another thread.
  • Of course, even honest mistakes like quoo made are useful to others. Perhaps this has happened to someone else, they've read quoo's comment, checked their JS settings and it's quickly solved their problem. Considering you can edit your post, I think there's enough in place already ;)
  • I'd just like to ask what 'Manage attachments' actually does?

    I gave a role this permission, they uploaded something and then were able to click edit & then had the option to delete the attachment or upload more.

    I removed the role permission and they could still do the same.

    I believe the two permissions are:
    Add attachments
    Manage attachments <----------------
  • Are you sure 'manage attachments' doesnt allow the user to manage other peoples attachments in the same way they can already manage their own
  • Yep, in order to manage it you have to first click 'edit'.

    My regular member role has 'manage attachments' enabled for it but it cannot edit/manage another member's attachments in anyway.. well not the admins anyway.
  • whenever i try to delete an attachment, it doesn't delete it...
    it display "deleting..." after asking confirmation to do the deletion...but then the file is still there in the forum and in the folder structure

    any idea what i could be missing ?
  • What browser are you using? Safari?
  • There's a problem with the Notify Extension that manifests itself when you use the Attachments extension.

    After I installed the Attachments extension, I couldn't download any binary file (images, pdfs, word docs, etc). The host application would tell me the file was corrupt, or something like that.

    On text documents, I noticed that the file was always padded with a couple of extra newlines at the top. Obviously, so file had some extra carriage returns, but which file?

    So, I disabled my other extensions one at a time, and found that Notify was the culprit. In both the Notify/default.php and Notify/ajax.php, there were two extra line feeds at the bottom of the files.

    So, if you have Notify installed, and your Attachments are not downloading properly, check your Notify extension.
  • Hello,

    I'm having some trouble attaching certain files using this add-on. Some .doc files work without a hitch, but some produce the following error message: "Some problems were encountered. The file you attempted to upload (Sea Life ds.doc) was of type "application/octet-stream", but the file extension "doc" did not match the accepted extensions for this type of file: rar, RAR."

    Any idea how I can fix this?
  • I have a different kind of problem. My site recently changed hosts and I had to migrate data the hard way i.e. manual backing up the files and transferring the data as well as DB dumps to the new servers. The transition is almost fine except for a problem in the attachments plugin.

    Previously, on my old server, I was able to Upload all my files and the plugin worked great. Since the day I've migrated to the new server - I cant see any attachments link on my comments section. I tried disabling and re-enabling the plugin but with no result. The strangest thing is that even the attachments plugin's settings link (which should be displayed on the settings page >> left side navigation) is not being displayed.

    Can someone help me out?
  • Sounds like your attachments default file got corrupted or something...can you download the default.php off your server and check it out? Might be worth just completely re-uploading the whole extension.
  • Just wondering if there has been any progress on getting Attachments working with Safari (Mac). My Safari users still can't upload files...

    Interestingly, Safari (PC version) works fine when uploading files.
  • I wanted to test this in the Safari 3 Mac Beta, but it quits every time I try to load it on my G4. After many tries, I uninstalled it and restored Safari 2 (which still doesn't work with this extension). Hopefully, we can try it when the next beta comes out (or if one of you have an Intel Mac and can actually run the beta for us!)
  • @minisweeper

    Well the strangest thing is that one of my forum members uploaded an attachment on the forum without any problem just yesterday. But I (although being an administrator) do not see any button to attach files. I thought It was a problem with my browser, but I tried with Firefox and IE7 both and yet the same result
  • Attachments 2.1 works in Safari Beta 3 for OS 10.4.9!
  • I reverted back to my old attachments version (1.4) and it was working like a charm. The attachments button was back again. But when I again re-uploaded and activated v2.1 the same thing happened. The attachments button disappeared from the discussions, there is no attachments settings link on the options page and yet somehow the attachments plugin does seem to work cause many of my forum's users are able to upload attachemnts.

    Can anyone tell me what am I doing wrong?
  • Hi Everyone!

    I have a huge problem. I am not only new to Vanilla (just accidentally typed Vankilla....Freudian slip, eh?), but new to owning a website, and new to computers. Prior to March, I had a webtv...version for dummies. I bought this forum I have now in February, got a computer in March, and have been crash-coursing it since. My website is under the account of the individual I purchased it from. Last week, it went offline. There was an upgrade, if that is the right word, to PHP 5.5 by the server from PHP 4.4., that I think must have made the site go offline. It came back on the next evening, after some fixes by the server, and everything was fine. The next day, I lost all my photo attachments on the forum, the content of the stickies but not the topic of them, and the Private Whispers started as Private Whispers, but not the whispers contained within already started Discussions. I also cannot "delete" anything. At first, that same day. I lost all the whispers, but retrieved them by changing the settings on them. I also cannot click on any of the uploaded extensions and add them to the forum, as a Microsoft postback error comes up. The only photos that remain are some of the copy and pasted ones, and the ones I have since posted. Since my forum is built on and revolves around a library of photos of horses, documenting the breed I am involved with, it is crucial that I retrieve those photos. That same day that I lost all these features, the individual that holds the server account uploaded the new upgrade of Vanilla to the forum. Since then, I've been at a loss as to what to do. The forum was working fine on the older version. Does anyone have any ideas as to what I need to do to retrieve the old attachment files on the forum as well as the other "fixes." I have read and read until I short-circuit. Yours truly, Clueless in Vanilla-Ville.
  • Well, I'm pleased to report that Attachments finally works in Safari! I got Safari 3 to work by deleting my Safari plist (thanks!) No trouble posting multiple attachments or downloading them from Safari 3! Yeah!
  • Does anyone know how to limit the size of an uploaded image with Attachments 1.4?
    I know that there are settings in settings.php - the current settings are supposed to limit thumbnail images to 100 x 100 pixels, but someone has apparently managed to override this and has uploaded a huge logo to a discussion! Is there a way to prevent this from happening?
    Thanks in advance!
  • Hi Guys, so now I'm here. Thing is, I don't speak code. But that obviously isn't stringently necessary since my Vanilla is up and running and it's beautiful. That said, there are a few little things...

    The issue: I got the Attachments Add-on and the Multi-File-Add-on (maybe that's important) - everything works just like it should. BUT when I try to upload anything bigger than 10 MB Firefox cancels after a few minutes and says: Connection closed; Website unavailable. I set the max. Filesize to 300 MB, so that can't be the cause.

    Is there some kind of timeout defined in one of those .php files that I could edit to make it work? Or do I have to change something somewhere else, like the Server? If this is the wrong place, since it got nothing to do with the plugin itself, please point me in the right direction.

    If you need to know more, I'm here... THANKS! Peace.

    P.S.: Haha JDW, I did everything along with you in this thread... I wish I would have started on page 2 (I didn't see the "More Comments" link... :-)
Sign In or Register to comment.