File or directory not found

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


When uploading a file to a subfolder, I'm not able to get DocumentProperties.
App SID: 74311684-7d58-4014-a180-411a048f9fdc

Path: share/private/slide/upload/1/3/1/5/1315/Test.pptx
Now, when trying to use a file from root, I get "Can't read MSCDFileSystem."
Can you please urgently check. It takes a lot of time to find out what happens here.

Do you have a documentation for die cloud service? path, folder, storage are not clear and similar in each method.

Thank you and kind regards
Dirk Münker
<?php


namespace BB\custom\extension\slide1\lib\components\presentation\classes {

use BB\custom\extension\slide1;
use Aspose\Cloud as Aspose;

/**
* @autor Dirk Münker
*/
class asposeSDK {

private $path;
private $dirname;
private $basename;
private $apiDocument;
private $apiExtract;
private $apiFolder;

/**
* @param $path
* @return self
*/
public function __construct($path) {
$this->path = $path;
$this->dirname = dirname($path);
$this->basename = basename($path);
$this->config();
}

/**
* @return array
*/
public function getAllTextItems() {
$document = $this->getApiDocument();
$textItems = $document->getAllTextItems();

return $textItems;
}

/**
* @return string
*/
public function getBasename() {
return $this->basename;
}

/**
* @return string
*/
public function getDirname() {
return $this->dirname;
}

/**
* @return array
*/
public function getDocumentProperties() {
$document = $this->getApiDocument();
$properties = $document->getDocumentProperties();

return $properties;
}

/**
* @param $key
* @return string
* @throws Aspose\Exception\AsposeCloudException
*/
public function getDocumentProperty($key) {
$document = $this->getApiDocument();
$property = $document->getDocumentProperty($key);

return $property;
}

/**
* @return mixed
*/
public function getPath() {
return $this->path;
}

/**
* @return array
*/
public function getSearchText() {
$properties = $this->getDocumentProperties();
$textItems = $this->getAllTextItems();

pre($properties);
preExit($textItems);

// Wie funktionieren die Pfade?
// Wie kann ich eine Slide anlegen und füllen?
}

/**
* @return int
*/
public function getSlideCount() {
$document = $this->getApiDocument();
$count = $document->getSlideCount();

return $count;
}

/**
* @return array
* @throws Aspose\Exception\AsposeCloudException
*/
public function getSplitSlides() {
$document = $this->getApiDocument();
$count = $this->getSlideCount();

$modelUtil = new \BB\model\util\util();
$modelUtil->createPath($this->path);

$result = [];
for($c = 0; $c < $count; $c++):

$path = APP_ROOT.$this->path.'/'.$c.'.pptx';
$image = APP_ROOT.$this->path.'/'.$c.'.png';

$document->saveSlideAs($c+1, $path, 'pptx');
$document->saveSlideAs($c+1, $image, 'png');

$result[] = [
'path' => $path,
'image' => $image
];

endfor;

return $result;
}

/**
* @return array
*/
public function upload() {
$folder = $this->getApiStorageFolder();

$folder->uploadFile(APP_ROOT.$this->path, $this->dirname);
}

/**
*
*/
private function config() {
Aspose\Common\Product::$baseProductUri = 'http://api.aspose.com/v1.1';
Aspose\Common\AsposeApp::$outPutLocation = APP_ROOT.'temp/aspose';

Aspose\Common\AsposeApp::$appKey = \BB\config::get('aspose:appKey');
Aspose\Common\AsposeApp::$appSID = \BB\config::get('aspose:appSID');
}

/**
* @return Aspose\Slides\Document
*/
private function getApiDocument() {

if(isset($this->apiDocument))
return $this->apiDocument;

$this->apiDocument = new Aspose\Slides\Document($this->path);

return $this->apiDocument;
}

/**
* @return Aspose\Slides\Extractor
*/
private function getApiSlideExtractor() {
if(isset($this->apiExtract))
return $this->apiExtract;

$this->apiExtract = new Aspose\Slides\Extractor($this->path);

return $this->apiExtract;
}

/**
* @return Aspose\Storage\Folder
*/
private function getApiStorageFolder() {
if(isset($this->apiFolder))
return $this->apiFolder;

$this->apiFolder = new Aspose\Storage\Folder();

return $this->apiFolder;
}
}
}

?>

Hi Dirk,

I have observed your comments and like to request you to please share with us the file which is causing the issue on your end so that we may investigate it further to help you out.

Best Regards,

Hi Ahmad,


thank you for your answer.
Please have a look at attachment.

Kind Regards,
Dirk

Hi Dirk,


I have observed your comments and worked with the file shared by you. I have not been able to reproduce the issue “Can’t read MSCDFileSystem”. I request you to please try using the latest version of Aspose Cloud SDK for PHP. Try with some other sample file as well and check if the issue is file specific or not. In case you still face the issue then please share with us the narrowed down code to access the file and reproduce the issue so that we may investigate it further to help you out.

Best Regards,