Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27382

Error picking file (image) from Dropbox plugin

    Details

      Description

      This is one followup of MDL-27330

      When testing the original issue (that has been integrated), it has been detected and reproduced both from local installation and qa.moodle.net that, once one file is picked, it is, somehow stored into some incorrect place, resulting in various warnings and/or broken images depending of the debugging level.

      This is what I get:

      ERROR: Invalid JSON string
       
      ( ! ) Warning: file_put_contents(eloy_avatar2006_gorila4skype.gif) [function.file-put-contents]: failed to open stream: Permission denied in /repository/dropbox/locallib.php on line 79
      Call Stack
      #TimeMemoryFunctionLocation
      10.0001643696{main}(  )../repository_ajax.php:0
      20.05424360536repository_dropbox->get_file(  )../repository_ajax.php:213
      30.05424360752dropbox->get_file(  )../lib.php:254
      40.64074369200file_put_contents
      (  )../locallib.php:79
       
       
       
      ( ! ) Warning: filesize() [function.filesize]: stat failed for eloy_avatar2006_gorila4skype.gif in /repository/repository_ajax.php on line 220
      Call Stack
      #TimeMemoryFunctionLocation
      10.0001643696{main}(  )../repository_ajax.php:0
      20.64114368248filesize
      (  )../repository_ajax.php:220
       
      {"error":"Can not read file, either file does not exist or there are permission problems","stacktrace":"* line 1048 of \/lib\/filestorage\/file_storage.php: file_exception thrown\n* line 810 of \/lib\/filestorage\/file_storage.php: call to file_storage->add_file_to_pool()\n* line 1003 of \/repository\/lib.php: call to file_storage->create_file_from_pathname()\n* line 243 of \/repository\/repository_ajax.php: call to repository::move_to_filepool()\n","debuginfo":null,"reproductionlink":"http:\/\/127.0.0.1\/~stronk7\/integration\/"}

      I've tried it also with filename without spaces nor underscores (just in case that could be the problem above) and got 100% same error.

      So something is really wrong when saving that file locally.

      Ciao

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Raising to critical and assigning to Dongsheng.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Raising to critical and assigning to Dongsheng.
              Hide
              dongsheng Dongsheng Cai added a comment -

              Eloy

              Shall we include this in 2.0.3? I got the patch here, will create branches ASAP (not in office yet)

              Show
              dongsheng Dongsheng Cai added a comment - Eloy Shall we include this in 2.0.3? I got the patch here, will create branches ASAP (not in office yet)
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Hi DS,

              I'll look at the patches today for integration, would be great to be able to get them into 2.0.3.
              Let me know when you've pushed them to your github account.

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Hi DS, I'll look at the patches today for integration, would be great to be able to get them into 2.0.3. Let me know when you've pushed them to your github account. Cheers Sam
              Hide
              dongsheng Dongsheng Cai added a comment -

              Thanks Sam

              I just pushed changes to my github.

              Regards,
              Dongsheng

              Show
              dongsheng Dongsheng Cai added a comment - Thanks Sam I just pushed changes to my github. Regards, Dongsheng
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Dongsheng this has been integrated now.

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Dongsheng this has been integrated now. Cheers Sam
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Tested and confirmed working.
              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Tested and confirmed working. Cheers Sam
              Hide
              salvetore Michael de Raadt added a comment - - edited

              I am able to find and add an image file from Dropbox, but either it doesn't appear to be downloading the file.

              This appears to happen when I download an image from the root folder of Dropbox, but not from sub-folders.

              Show
              salvetore Michael de Raadt added a comment - - edited I am able to find and add an image file from Dropbox, but either it doesn't appear to be downloading the file. This appears to happen when I download an image from the root folder of Dropbox, but not from sub-folders.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              This is now part of Moodle upstream, you did it possible, thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - This is now part of Moodle upstream, you did it possible, thanks!

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/May/11