07-11-2017 03:42 AM
I have installed alfresco-community-5.0.d-installer-linux-x64.bin. Now i dont know from where to start learning. I am noob in this but i want to learn and i dont know from where to start. I have downloaded community edition and i dont know the differences between enterprise and community editions.
Please someone help me regarding this.As i have to do File Uploading using PHP in alfresco localhost and I dont know from where to begin.
Can someone Help me Please.?
07-11-2017 06:12 PM
I assume you have tried to look at the documentation? If so, what aspects remain unclear after following the videos, guides etc.?
07-12-2017 02:23 AM
Very Big Thank You for replying
Well i have gone through that and currently doing a project related to alfresco.
I have a accout in alfresco and i want a php api for uploading my document to the repository of alfresco.
Well there are so many examples related to file file upload but those for localhost.
This my main file
<html>
<head>
<title>Upload</title>
</head>
<body>
<?php
require_once "Alfresco/Service/Repository.php";
require_once "Alfresco/Service/ContentData.php";
require_once "Alfresco/Service/Session.php";
require_once "Alfresco/Service/SpacesStore.php";
require_once "Tutorials/required.php";
$repositoryUrl = "****";
$userName = "**************";
$password = "**************";
$parantID="****";
$repository = new Repository($repositoryUrl);
$ticket = $repository->authenticate($userName, $password);
$mysession = $repository->createSession($ticket);
$store=new SpacesStore($mysession);
$node=$mysession->getNode($store,$parantID);
$upload=$node->createChild('cm_content','cm_contains',"$fname");
$contentData=new ContentData($upload,'{http://http://www.alfresco.org/model/content/1.0}content');
?>
</body>
</html>
This my reuiqred.php
<html>
<head>
<title>Upload</title>
</head>
<body>
<?php
$fname = $_FILES['uploadFile']['name'];
if (isset($_POST["Submit"])) {
$fname=$_FILES['uploadFile']['name'];
$ftmp=$_FILES['uploadFile']['tmp_name'];
$ftype=$_FILES['uploadFile']['type'];
$fsize=$_FILES['uploadFile']['size'];
$contentData->encoding = 'UTF-8';
$contentData->writeContentFromFile($ftmp);
$contentData->size = $fsize;
$contentData->mimetype = $ftype;
$upload->cm_name = $fname;
$upload->cm_description = 'File Description';
$upload->cm_content = $contentData;
echo "ContentData = ".$contentData."<br>";
$mysession->save();
echo "done";
}
else ?>
< form action="/display.php" method="post" enctype="multipart/form-data">
< input type="file" name="uploadFile">
< input type="submit" value="Upload" name="Submit">
</form>
</body>
</html>
And i am executing this program in my apache using ubuntu.
what all stuff do i need to make this program execut .
I have gone through a lot of tutorials and websites but couldn't able to find for what i am looking.
Please Help me regarding this.
Explore our Alfresco products with the links below. Use labels to filter content by product module.