× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dropbox & Composer help
#1
Hi All,

I have just upgraded my Userspice to the latest version after being many version behind. I have got most of my site working but appear to be having an issue with on part. I currently have a process that uploads a file to Dropbox - this is based on the following guide / files https://github.com/kunalvarma05/dropbox-...load-Files.

For some reason with the update this script has stopped working and I can't figure out why. Can anyone help? The file gets created but does not upload and stops at the creation step. It worked perfectly in my previous version.

Looking through my code I have attached the point at which I think it stops if anyone can see anything obvious.

$file = "post/$filename.csv";

file_put_contents($file, $csv);
chmod($file, 0777);

require __DIR__ . '/vendor/autoload.php';
use Kunnu\Dropbox\Dropbox;
use Kunnu\Dropbox\DropboxApp;
use Kunnu\Dropbox\DropboxFile;
use Kunnu\Dropbox\Exceptions\DropboxClientException;

//Configure Dropbox Application
$app = new DropboxApp("XXXXXXXXXX", "XXXXXXXXX", "XXXXXXXXXXXXX");

//Configure Dropbox service

$pathToLocalFile = __DIR__ . "/post/$filename.csv";
$dropbox = new Dropbox($app);

$dropboxFile = new DropboxFile($pathToLocalFile);
$file = $dropbox->upload($dropboxFile, "/apps/clickanddrop/$filename.csv", ['autorename' => true]);

//Uploaded File
$file->getName();
?>
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<h1>Shipping File Upload</h1>
<!-- Content Goes Here. Class width can be adjusted -->
              <div class="alert alert-success">
  <strong>Success!</strong> <a href="https://business.parcel.royalmail.com/" target="blank" class="alert-link">Click Here To Print Labels</a>.
                <?php header( "refresh:30;url=$us_url_root./users" ); ?>
</div>
<!-- End of main content section -->
</div> <!-- /.col -->
</div> <!-- /.row -->
</div> <!-- /.container -->
</div> <!-- /.wrapper -->
  Reply


Messages In This Thread
Dropbox & Composer help - by waynebr - 09-06-2018, 11:10 AM
RE: Dropbox & Composer help - by Brandin - 09-06-2018, 11:34 AM
RE: Dropbox & Composer help - by waynebr - 09-06-2018, 11:44 AM
RE: Dropbox & Composer help - by waynebr - 09-06-2018, 01:57 PM
RE: Dropbox & Composer help - by Brandin - 09-06-2018, 04:22 PM
RE: Dropbox & Composer help - by waynebr - 09-06-2018, 05:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)