Is there a way to check uploaded files?

cancel
Showing results for 
Search instead for 
Did you mean: 
massimo0987
Active Member

Is there a way to check uploaded files?

Dear Community,

we have installed Alfresco community v.5.2.0. A colleague of mine told me that a document which he was sure to have uploaded is disappeared from Alfresco. Is there a way to check if Alfresco has lost an updated document? And how can we check if uploaded documents are always in the folders?

Thank you for your reply,

regards

Massimo

7 Replies
sepgs2004
Established Member

Re: Is there a way to check uploaded files?

How was the document uploaded?

Gnanasekaran Sakthivel
cesarista
Customer

Re: Is there a way to check uploaded files?

Although the questions are somehow general and they may speak about trust in your content management system, the simplest could be just to check the logs, when the user updated the document, to see errors related or many errors in the time the user assures to do the update. To check sites activity may help to check the update (if it was updated in sites). If having audit enabled you could track user actions too. All of this will be a starting point, but only if you trust in the correct work of your Alfresco system.

Regards. 

--C. 

massimo0987
Active Member

Re: Is there a way to check uploaded files?

Hi to all,

I will reply to your questions:

for Sepgs2004: the document has been uploaded about two months ago using the standard button "upload" on the top.

for Cesarista: so, you suggest to check logs and to enable audit. I'm new to this, could you give me some information on how to check logs and how to enable audit? Our Alfresco site is collaborative type.

Thank you for your replies. For me is very important this matter. I cannot continue to trust in Alfresco, if documents disappear from the folders.

I wait for your further suggestions, best regards

Massimo

sepgs2004
Established Member

Re: Is there a way to check uploaded files?

Sorry for the long delay. 

The reason I am saying this is to confirm 100% that the document is no where to be found. May be you have already verified this.

On this line of thought...

You could quickly install and run a CMIS workbench client and query for documents/objects that are inserted between certain dates to see more.

I do not know if you have any (Alfresco) rules to not take certain (kinds of) documents inside a (certain) folder or so. For this, one has to write specially. So you can quickly check on this.

Also try doing the same upload today (especially the same document to the same folder in the same manner) and see if it is available. Also check with CMIS client if possible.

For audit, you might have already found out. I found some notes online.

ttp://docs.alfresco.com/6.0/references/dev-extension-points-audit.html

Gnanasekaran Sakthivel
massimo0987
Active Member

Re: Is there a way to check uploaded files?

Dear Sepgs2004,

thank you for your accurate reply. Following your suggestion, I've installed CMIS Workbench client. This sw is new to me, so now I've to learn how to use it and how to make the queries. Hoping not to disturb you so much, could you tell me which is the sintax for the query you mentioned? Is there a guide somewhere?

Waiting for your feedback,

best regards

Massimo

sepgs2004
Established Member

Re: Is there a way to check uploaded files?

Once you get a short overview on the queries, it is not that difficult to write them. CMIS queries can be written and called from CMIS API's in languages like Java, Python, etc. Also, you can directly write queries using the CMIS workbench for debugging and learning.

You might have already found some related resources online

ttps://chemistry.apache.org/docs/cmis-samples/samples/query-examples/index.html

This has some examples, probably in python

ttps://chemistry.apache.org/python/docs/examples.html#get-a-repository-object

On the other hand, if you can get a hold of this book PDF - CMIS and Apache Chemistry in Action,

then it contains a dedicated chapter at least on queries.

This CMIS and all looks like a deviation from resolving your original issue. However I hope this will help your Alfresco work in some way or other.

One custom example

Here we have our own custom type (slo) extending the cmis:content, which contains our custom aspect (slo:documentProperties) as mandatory.
documentProperties is our custom aspect of several properties
Trying to query with where clause containing conditions on our custom aspect properties (lo_link, lo_category)

SELECT doc.*, SLOALIAS.* FROM cmis:document AS doc JOIN slo:documentProperties AS SLOALIAS ON doc.cmisSmiley SurprisedbjectId = SLOALIAS.cmisSmiley SurprisedbjectId WHERE IN_TREE(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405') AND (SLOALIAS.slo:lo_link = 10) AND (SLOALIAS.slo:lo_category = 'Comp')

<types>
<type name="slo:lodocument">
    <title>slo Document type</title>
    <parent>cm:content</parent>

    <!-- associations section - no associations as of now -->
    <!-- aspect is defined to hold all the properties -->
    <mandatory-aspects>
        <aspect>slo:documentProperties</aspect>
    </mandatory-aspects>
</type>

</types>

<aspect name="slo:documentProperties">
  <title>lo document properties</title>
  <properties>

    <property name="slo:lo_category">
      <title>Category</title>
      <type>d:text</type>
    </property>
    <property name="slo:lo_link">
      <title>Link ID</title>
      <type>d:int</type>
    </property>

...

Some queries from the book aforementioned

SELECT * FROM cmisbook:text where cmisbook:author IN ('Jane Taylor', 'Geoffrey Chaucer')

String:
SELECT * FROM cmisbook:text where cmisbook:author
IN ('Jane Taylor', 'Geoffrey Chaucer')

DateTime:
SELECT * FROM cmisbook:image WHERE cmis:creationDate
NOT IN ( TIMESTAMP '2011-06-30T12:00:00.000Z',
TIMESTAMP '2012-06-30T12:00:00.000+00:00')

ID:
SELECT * FROM cmis:document WHERE cmisSmiley SurprisedbjectId IN
('130','131','132','133')

Integer:
SELECT * FROM cmisbook:audio WHERE cmisbook:year
NOT IN (1988, 1990)

Decimal:
SELECT * FROM cmisbook:video WHERE cmisbook:videoDuration
NOT IN (0, 60.0, 120.0)

To match a percent sign or underscore in a LIKE predicate, the escape character
backslash (\) must precede the % or _. This example returns all of the lyrics for song
titles that start with “Sacred_”:
SELECT cmisbook:songtitle FROM cmisbook:lyrics
WHERE cmisbook:songtitle LIKE 'Sacred\_%'

This example returns all of the lyrics in which the author name ends with “%Bleu”:
SELECT cmisbook:author FROM cmisbook:lyrics
WHERE cmisbook:author LIKE '%\%Bleu'

The following two examples
should both work to return all of the lyrics for documents where the song titles start
with “David’s”:
SELECT cmisbook:songtitle FROM cmisbook:lyrics
WHERE cmisbook:songtitle LIKE 'David''s%'
SELECT cmisbook:songtitle FROM cmisbook:lyrics
WHERE cmisbook:songtitle LIKE 'David\'s%'

Finally, if you want to match the backslash character itself, add another backslash. This
example matches “back\slash” in the song title:
SELECT cmisbook:songtitle FROM cmisbook:lyrics
WHERE cmisbook:songtitle LIKE 'back\\slash%'

Try testing a Boolean property for FALSE, or not set at all:
SELECT * from cmisbook:note where cmis:isVersionSeriesCheckedOut is null OR
cmis:isVersionSeriesCheckedOut = FALSE


SELECT * FROM cmisbook:note WHERE ANY cmisbook:noteLinks
NOT IN ( 'resource.txt' , 'test.txt') OR cmisbook:noteLinks IS NULL

Gnanasekaran Sakthivel
massimo0987
Active Member

Re: Is there a way to check uploaded files?

Dear,

Thank you for your very complete reply. There's a lot to study here! I've got the book, I will study CMIS.

Thank you so much for your important support. I hope we can contact again in the future.

Best regards

Massimo ( Milan-Italy)