Free Support Forum - groupdocs.com

Error: Document not found


#1

Hi there,


When uploading a document through the API the document is uploaded successfully but when I try to view it with the groupdocs viewer I get the error "The document is not found."

I know the document is there because when I download it, the PDF opens normally.

What is causing this error?



#2

Hello,


We are sorry to hear that you have such issue. We have checked the uploading and viewing functional and all works well for us. Could you please share with us next:

1. Cod example which you use for this.
2. Your account email - email which you use for GroupDocs registration. We need this to be able to check your GroupDocs account for the issues.

Thank you.

#3

This is the code is use to upload

public function get_document_uploadcare_guid($document, $user_id)
{
	// Create signer
	$signer = new GroupDocsRequestSigner("6888129b868027073587170b0f9a801a");
//Create apiClient object
$apiClient = new APIClient($signer);
$api = new StorageApi($apiClient);

// Check if there is a document
$user_customisation = reset($this->db->get_where('user_customisations', array('user_id' => $user_id, 'document_id' => $document->id))->result());

// If there is a document, return the guid. Otherwise upload it
if($user_customisation){
	return $user_customisation->groupdocs_guid;
}else{
	// Upload the file to groupdocs
	$response = $api->uploadWeb("ae667556f5cbeb6e", base_url('uploads/files/' . $document->document_languages[0]['preview_file']));

	$this->user_customisations->insert(array('user_id' => $this->user_id, 'document_id' => $document->id, 'groupdocs_guid' => $response->result->guid));

	// Return the guid
	return $response->result->guid;
}

}

I know it uploads correctly because I can download the file and it works normally.


2. Account email: info@uni-t.be


#4

Hello,


Thank you for the code example. Since file uploaded and you can download it we can assume that the issue reason is in code which you use for file viewing. Please also share with us code which you use for file viewing (for Viewer URL generating).

Thank you

#5

It happens in your own viewer when I click the pdf, see attached screenshot.


The document id is 1342a92a49b48210e59f34d00202ba3eb7af0fafa9b6b5a547fd3022831b7a01

#6

Hello,


Thank you for this information. We have reproduced the issue and our core developers works on resolving it. It will be resolved soon.

#7

Hi,


Any update on this? Our customer is getting impatient and there’s nothing we can do.


#8

Hello,


We work on the resolving the issue and we will make all best to resolve it today.

Sorry for the delay.

#9

Hello,


We glad to notify you that the issue is resolved.

Please try again and notify us with the results.

#10

Great! It works, thanks for resolving the issue