Add a Label Upon Uploading a File
Asked by Roberta:

Hi,

I was wondering if there is a way to add a label to a file upon uploading it to a page, either by dragging or dropping or browsing for files.

As of now, the only way I could do it is first uploading the file, then adding a label. It would be something that after selecting the file to upload, the system would give me an option to add a label to it.

Let me know if there is a way to do this.

Thank you in advance,

Roberta


Answers:
author: Jonathan Smith
body: Hi [@Roberta](/t5/user/viewprofilepage/user-id/968348),

The functionality you are requesting is not in the attachments macro.

Have you tried clicking the attachment icon (paperclip) at the top of the page right after uploading the files? You can sort by creation date and add labels to the necessary files.

- Jon

comments: author: Roberta
body: Hi Jon,

Thank you for looking into my question. I actually have sections on my page. Each section has an upload file macro and a filter by label. I want to be able to allow the user to drag/drop or browse a file to upload but then allow him/her to add a label to the file upon uploading.

Now, when they do the upload, the file does not display in the section since there is no label as specified in the filter. If I remove the filter, all files within the other sections are also displayed.

Let me know if this makes sense.

Thank you in advance.

Roberta


author: Jonathan Smith
body: Think of multiple attachments macro **on one page** as a mirror. Each mirror is showing the same files but you are telling mirror A to only display X label and mirror B to display Y label.

If you delete a file out of one of your file lists, it will be deleted from the others.

I don't believe the functionality to auto-tag incoming content is in the attachment's macro or it would have been a parameter. This would be a good enhancement request though! Even if it could auto-tag, each attachment macro would need to live on it's own page.


author: Roberta
body: [@Jonathan Smith](/t5/user/viewprofilepage/user-id/1254033), thank you for the information, I will play with it a little.

One thing I have tried though is to create a page template with a specific tag because I thought that files uploaded to a page from this template would also have the tag attached once the user uploads a file, but it didn't. Unless there is anything specific that I have to set in my template. Let me know if you have any thoughts on this.

Best,

Roberta


author: Jonathan Smith
body: [@Roberta](/t5/user/viewprofilepage/user-id/968348)

Morning. Labels in page templates are just for the pages.

If you want, I can move this request into the marketplace and see if any 3rd party vendors would want to develop this solution.


author: Jonathan Smith
body: Thanks for bringing up this topic by the way.

I now have ideas on having 1 file list with everything tagged. Then display "content by label" macro on various pages which act like SharePoint document views.


author: Roberta
body: [@Jonathan Smith](/t5/user/viewprofilepage/user-id/1254033)

Hi, Jonathan. Sorry for the late reply.

I think the idea is great and I was wondering how hard that would be to create the macro. It seems such a basic thing to be able to have it within Confluence, right? I believe if someone puts it in the marketplace, it will be hard for me to make the case for my company to buy it. I can't justify thousands of dollars for a basic functionality, unfortunately, the corporate world doesn't work like that.

Thank you in advance and keep me posted if you ever come up with a solution.

Best,

Roberta


author: Dan Levine
body: This would be an amazing add-on we are trying to do the same thing. Have a single page with multiple boxes to attach files to the same page. Each attachment macro would tag the file depending on which one was used to upload it.

comments: author: Jonathan Smith
body: [@Dan Levine](/t5/user/viewprofilepage/user-id/1760630) Would suggest requesting this as an enhancement. I would like 'document management' to get a little more spotlight in this tool. It would make it a way better competitor compared to other content management systems.

- Jonathan


author: Andreas Purde
body: Dear Dan,

as I had the same problem in my company I created an app which exactly does what you describe. It is here: [https://marketplace.atlassian.com/apps/1220787/attachment-boxes](https://marketplace.atlassian.com/apps/1220787/attachment-boxes?hosting=server&tab=overview)

I would be happy if you try it out.

Kind regards

Andreas


author: Jonathan Smith
body: Ok, that looks pretty great! Now if Atlassian would make it super easy to modify blueprints, I would add that wrapper on the attachments macro from the start!

Nice work!

- Jonathan


author: Andreas Purde
body: That, or: technically it would very simple to grab all Attachments macro via JS which contain a label filter and automatically add the core functionality of the app. Of course you can't define any colored box in that case.


Tags: confluence-server

server