Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the difference between confluence attachments vs. attachments uploaded by users?

In Confluence versions 3-6, there are attachments that are built into the system (like global logos and various fav-icons.PNG).  You can see more information about them here: https://confluence.atlassian.com/doc/changing-the-site-logo-138567.html

 

After Confluence is installed and ready for use, users can begin to upload their own attachments. 

My Question : How can you tell the difference between attachments that come bundled with confluence 6.2 and ones the user uploaded in the database?

In the database, we can run the following query:

SELECT * from CONTENT where CONTENTTYPE='ATTACHMENT'

This gives a list of all the attachments in the database (favicon.PNG files as well as user uploaded ones). 

How do I modify the SQL query to give a list of only user-uploaded attachments? Could it possibly be:

 

SELECT * from CONTENT where CONTENTTYPE='ATTACHMENT' and spaceid != 0 

 

I would appreciate an answer from Atlassian database team. 

 

Thank you.

1 answer

0 votes

Confluence databases are slightly more clever and explainable than Jira databases, but they still really do have the same attitude that Jira does - it's a data store, not a database, and hence the worst possible way you can possibly try to read the information in it (not data, information).

Too much of the logic is done in the code.

There is no easy way to distinguish between "system", "space", or "page" attachments, let alone the others, or the stuff thrown in by apps.

Whatever you are trying to do here, I would strongly recommend moving to use the REST API instead of database reads.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
6.2.0
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

75 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you