Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to delete an attachment even before posting

edited September 2011 in Vanilla 2.0 - 2.8
I am a bit confused with this plugin:
1. I thought I was allowed to upload multiple files together. But actually, I can only upload one file at a time. How to enable multiple file uploading?

2. When I upload an attachment, I see "insert image" link. But how do I un-attach/delete an attachment? (This is even before the comment is saved)

3. "Insert Image" link actually does not work. When I click "insert image" nothing happens. I have CLEditor enabled.


Help would be appreciated.

Answers

  • LincLinc Detroit Admin
    No, FileUpload only allows you to upload one file at a time.

    For 2 & 3 I filed issues:
    https://github.com/vanillaforums/Garden/issues/1094
    https://github.com/vanillaforums/Garden/issues/1095
  • I want to know too how to remove the file before the posting... because if I upload a wrong file I need a option to undo that right?

  • Maybe the button 'Cancel' will help you.

  • One file at a time, but you can attach multiple files. You just need to upload them one by one.

    @johanslocker seems to enjoy snarking at other people's expense, but I see no 'Cancel' button at any part of the process, so I think he's either joking or I don't know what.

    CLEditor also conflicts with restoring drafts last time I checked, so I'm going with the button bar addon, I think it's called, at least for now, for simple post formatting.

    Also, if you're doing dev work on windows localhost, be aware that Fileupload doesn't function properly until you hack the core. Horrifying, but there you go.

  • hbfhbf wiki guy? MVP

    The wsiwyg editors are very spotty at best in terms of thier support in the real world. They have fits with some browsers, flat out dojt work in others, and yet work flawlessly in a couple. Button bar is a more practicle solution since it works the same everywhere.

    Im.wondering if johanslocker is just a victim of languange barrier. Ive seen a few post that were hard to interpret the intent precisely. Maybe he was suggesting that a cancel button would be helpful.

    And there is a way to remove unwanted attachments. I do it periodicalllty.

  • peregrineperegrine MVP
    edited May 2012

    stavthewonderchicken said:

    .

    @johanslocker seems to enjoy snarking at other people's expense, but I see no 'Cancel' button at any part of the process, so I think he's either joking or I don't know what.>

    I find some of your attacks more offensive than some of the remarks you are attacking, perhaps its just me. Perhaps its time to take a deep breath and lighten up.

    "Quis custodiet ipsos custodes?" comes to mind Quis snarkiet ipsos snarkes?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited May 2012

    you can more file attached in a time but it would be possible ony by one step .

    [Link Deleted by UnderDog]

  • 422422 Developer MVP

    @stuartweb , lose the signature please. Or I will report you to the Mod Team

    There was an error rendering this rich post.

  • edited May 2012

    peregrine said:

    I find some of your attacks more offensive than some of the remarks you are attacking, perhaps its just me. Perhaps its time to take a deep breath and lighten up.

    "Quis custodiet ipsos custodes?" comes to mind Quis snarkiet ipsos snarkes?

    @peregrine I invite you to show me where I've attacked someone. Go ahead, I'll wait. Sorry if you're offended by me -- so it goes -- but I'm not keen to participate around here when there's a culture of offhanded insults and sarcasm, and I'm happy to call people out for it when I see it.

    If I misunderstood @johansonlocker's comment and he wasn't actually trying to be snarky, it's just that English is not his first language, my apologies.

  • And there is a way to remove unwanted attachments. I do it periodicalllty.

    You can delete them from posts after the post has been made. I believe the question is how to do so before committing the post. I don't believe there is a way to do that.

  • edited May 2012

    stavthewonderchicken said:

    And there is a way to remove unwanted attachments. I do it periodicalllty.

    You can delete them from posts after the post has been made. I believe the question is how to do so before committing the post. I don't believe there is a way to do that.

    fileupload.js

                // Add "insert image" button
                if (JResponse.MediaResponse.FinalImageLocation != '') {
                    var ImageAnchor = jQuery(FileListing.find('a.InsertImage'));
                    ImageAnchor.attr('href', JResponse.MediaResponse.FinalImageLocation);
    
    
                  +++ MediaNum=jQuery(FileListing.find('.FileOptions input')).attr('value');
                  +++ var CancelButton = jQuery(ImageAnchor.parent()).append(
                  +++ ' | <a class="DeleteFile" href="'+
                  +++ '/forum/plugin/fileupload/delete/'+MediaNum+'"><span>Cancel</span></a>');
                  +++ AllowDeletes();
    

    bla bla bla div.Attachments

            function AllowDeletes()
            {
              // Allow deletes
              jQuery('a.DeleteFile').popup({
    

    Unbelievable. yeah.

  • Er, thanks (but I'm not actually the person that asked about this). If that works, I guess now there is a way to do it. @blizzard01

Sign In or Register to comment.