We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    I have been working on an idea with the help of Dimmy to create pages on registration... these pages will include the FDM snippet which allows the person to edit a single page that they created on registration.

    I was thinking about having a folder created at the same time of the registration that would allow the user to upload their own content to this folder and it only be their’s. It would allow them to upload images etc so they can use it on their own document that they can edit.

    I’m just pulling several snippets together to see if I can get the idea working and the upload feature would be great.
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 19315
      • 84 Posts
      Quote from: Pikachu at Jun 19, 2008, 04:23 AM

      I think it’s possible to bring session cookies to the JS, and then use them to allow the JS to access the page like a classic webuser. But I’m not sure about security (Send cookies :s) and all that stuff.
      I’ve looked at the code for this snippet, and I’m now thinking this sort of thing isn’t needed. The "canUpload" function, which seems to be used when in a "frontend" upload, uses $modx->getLoginUserID as the way of verifying the user. I assume this must work by checking the http session cookies, so it seems like the cookie headers are sent with the flash upload. I’m not too sure about this though.

      EDIT: By the way, I have modified this to use FancyUpload V2, so maybe that sets up the http headers correctly?
      EDIT2: Now I think the orignal fancy upload must have set them correctly as well, as the front end upload worked fine.

      Michal.
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Susan, I already have a plugin that generates pages... could you tell me where I could find information on how to generate a folder, say in a folder assets/useruploads/username? I’ve searched the forums and I can’t see anything that creates folders.


        Thanks, Ross
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 28042 ☆ A M B ☆
          • 24,524 Posts
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 30884
            • 142 Posts
            Quote from: mbrinson at May 26, 2008, 11:49 AM

            This is working great in firefox, but I can’t get the mootools version to work under IE6 or 7.
            The attached screencapture is what I get in either version of IE:

            Do I need to use the Uploadswitcher or something to force that mode in IE?

            I saw a post by TXRX that shows it with the right "Browse Files" button that allows for multiple file selection, mootools, etc.
            Any hints as to how you did it TXRX?



            Sorry if I’ve been slow to respond, not had much chance of late to get back onto working on the Axis Site. I’m now looking further into the upload snippet but it’ll be a while before I get back into where I left this one.

            If I remember right what Pikachu has said at the end of the page before this, it does seem to be some weird JS & mootools implementation on IE. I nearly got there, I certainly was close to finding out exactly where IE was drifting away firefox’s behaviours.

            The appearance of the browse list et al had quite a bit to do with the CSS for IE and FF. Then, if I remember correctly, it’s actually a verision (can’t remember which) of Mootools, which was either different from the version in the snippet download ie: older or slightly newer from mootools website itself that made it start working (in appearance) as it does in FF.

            But after searching through the Modx and mootools forums there was a general opinion that fancy uploader itself was broken in IE with that version of MooTools at that time. Who knows maybe on the MooTools side this has been fixed.

            Either way I’m actually needing to get this working again. I’ll make sure it’s up to date using FF and then I’ll see what movement IE has had on this front.

            It’s not going to be a quick thing however, but I’ll be sure to post any progress here so it may be worth subscribing to notifications on this thread if you want auto-updates etc.

            Sorry I couldn’t help more (or sooner!)

            Cheers

            TxRx
              p i x e l p u s h e r e x t r o d i n a i r e
              A x i s A n i m a t i o n . c o m
              • 5091
              • 332 Posts
              Is it possible to add a ’delete’ feature? I am using FileUpload currently, and it has no ’delete’ feature either.

              As a user, it just doesn’t make sense to me that a File upload snippet doesn’t provide a delete feature, because it’s extremely useful when you need to replace a file that you uploaded previously. Or if the file name is the same, the old file will get replaced?

              I am using the snippet for a site, and in just 2 weeks, client sent me the reverse versions 4 times for the same PDF file:( I really hate the idea of telling client that she has to use FTP access to delete the file when I hand over the site to her and she does her site updates.

              With Maxigallery, it allows delete uploaded images, so I am guessing it’s possible to add a delete feature yes?

                • 28042 ☆ A M B ☆
                • 24,524 Posts
                http://www.php.net/manual/en/function.move-uploaded-file.php

                Warning

                If the destination file already exists, it will be overwritten.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 30884
                  • 142 Posts
                  Nice one smiley

                  That’d be a worthy addition to Fancyuploader code. Using the above linked code from Susan would prevent the need to create a file manager type page/code. Granted you’d have to find some way to organise & tidy up one way or another.

                  <note to self> Try adding that when next playing with Fancy Uploader </note end>

                    p i x e l p u s h e r e x t r o d i n a i r e
                    A x i s A n i m a t i o n . c o m
                    • 6531
                    • 154 Posts
                    I can’t get this to work. I tried installing as per the instructions:
                    1. I copied all files to [tt]/assets/snippets/FancyUpload[/tt] 
                    2. I created the snippet and the chunk.
                    3. Called it with [tt][!FancyUpload? &FancyTpl=`FancyUploadChunk` &extensions=`jpg,png,gif,pdf,txt,doc,xls,ppt,zip,rar,rtf,txt,c,cpp,odt` &maxsize=`52428800` !][/tt]
                    [note: I believe the FancyTpl is in error in the instructions -- should be `FancyUploadChunk` not `UploadChunk`]

                    I get a ’Choose File’ form and a ’Queue’ box, but if I try to upload, the URL changes to [tt]http://[my site root]/index.php?id=80?relPath=[/tt] and I get the ’404’ page.

                    Do I need to put the .js or .swf files somewhere special?

                    Do I need [tt]insertmootools=`1`[/tt] or something?

                    Thanks!
                      • 23383
                      • 138 Posts
                      One question : Is your site online ?
                      Because if it is offline, it won’t work.
                      Another question : Has your page got any private group setting ?