09-06-2018, 11:10 AM
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 -->
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 -->