# How to attach File Manager to a thing (data type)?

**URL:** <https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333>\
**Category:** Database\
**Created:** [January 31, 2023, 8:10am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333 "2023-01-31T08:10:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vennio](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vennio](https://forum.bubble.io/u/vennio)\
**Post date:** [January 31, 2023, 8:10am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/1 "2023-01-31T08:10:08Z")

</div>

Hi,  
I use a plugin to create a PDF file that would be saved on File Manager, the PDF generated would be named the invoice number from the Invoice page, so it’s easy to find it in the back end (database), but I’d like to be able to attach that file to the invoice, which I couldn’t figure out.  
Any idea?

Cheers.

---

<div class="post-metadata">

**Author:** ![andy.i](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andy.i/32/64210_2.png) [@andy.i](https://forum.bubble.io/u/andy.i)\
**Post date:** [January 31, 2023, 8:12am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/2 "2023-01-31T08:12:00Z")

</div>

Hey @vennio check this thread out. 🖖 [Make File Private using workflow - #11 by ZubairLK](http://forum.bubble.io/t/make-file-private-using-workflow/10534/11)

---

<div class="post-metadata">

**Author:** ![vennio](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vennio](https://forum.bubble.io/u/vennio)\
**Post date:** [February 3, 2023, 6:15am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/3 "2023-02-03T06:15:00Z")

</div>

Hi, @andy.i, thanks for the response.  
When I use the plugin to create that file, it’s automatically saved in the file manager, the file is not uploaded manually by user, therefore, I cannot do the settings as shown in the thread you provided.  
Any clue how to do it without the manual upload part?  
I want to

1. attach the file to a thing (that invoice the file is generated from)
2. retrieve the file’s URL and show it somewhere on the page so the user can download that file later.

Much appreciate it.

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [February 3, 2023, 6:20am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/4 "2023-02-03T06:20:36Z")

</div>

@vennio What plugin is it? There should be an event available like _[your plugin element] PDF is ready_ then you can _Make changes to a thing_ and set a thing’s file field to This [plugin element]'s PDF’s file (or whatever shows up)

---

<div class="post-metadata">

**Author:** ![vennio](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vennio](https://forum.bubble.io/u/vennio)\
**Post date:** [February 3, 2023, 6:46am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/5 "2023-02-03T06:46:21Z")

</div>

@tylerboodman I found the custom event.  
Thank you very much!

---

<div class="post-metadata">

**Author:** ![andy.i](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andy.i/32/64210_2.png) [@andy.i](https://forum.bubble.io/u/andy.i)\
**Post date:** [February 3, 2023, 9:31am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/6 "2023-02-03T09:31:38Z")

</div>

@vennio gotcha. Sorry, i misunderstood your question.

Your method will make it easy to find in the database (PDF is ready event). The method I posted is useful if you want to attach the file to a data entry to protect it via privacy rules.

Some plugins also allow you to do this with a “attach to” field or similar.

---

<div class="post-metadata">

**Author:** ![agiledood](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/agiledood/32/243470_2.png) [@agiledood](https://forum.bubble.io/u/agiledood)\
**Post date:** [February 6, 2023, 10:56pm UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/7 "2023-02-06T22:56:02Z")

</div>

If using ‘attach to’, how do you retrieve the file? I’m using Group to PDF and the file generates and stores in the file manager, but I don’t know how to retrieve it.

After the plugin creates and stores the PDF, I assume I’d have to store the reference to it? Is there any “get a list of files attached to current user” or something?

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [February 7, 2023, 12:01am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/8 "2023-02-07T00:01:02Z")

</div>

The plugin has to put the file somewhere, so it goes to your app’s storage, but leave that alone.  
Most likely on your page your plugin adds an event like _PDF is ready_ or something in the workflow tab. That would trigger when the PDF is created and you can do _Make changes to a thing_ and save This [PDF element] File (or something) to your database in some Thing’s file field

(Just like @vennio did)

---

<div class="post-metadata">

**Author:** ![agiledood](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/agiledood/32/243470_2.png) [@agiledood](https://forum.bubble.io/u/agiledood)\
**Post date:** [February 7, 2023, 12:24am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/9 "2023-02-07T00:24:23Z")

</div>

yeah, that’s what I tried, I was just curious if there was a built in method in bubble for accessing files if you use ‘attach to’. I guess that is only for privacy.

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [February 7, 2023, 12:29am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/10 "2023-02-07T00:29:50Z")

</div>

Yea I think they just want us to manage our own file structure by doing what I described.

IMO built-in Bubble file management is kind of garbage, everyone dumped on the same bucket, all files public by default AND no way to set a file to private after the fact, no actions to rename, no way to get the MIME/type, etc.

---

<div class="post-metadata">

**Author:** ![vennio](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vennio](https://forum.bubble.io/u/vennio)\
**Post date:** [February 7, 2023, 9:40am UTC](https://forum.bubble.io/t/how-to-attach-file-manager-to-a-thing-data-type/244333/11 "2023-02-07T09:40:15Z")

</div>

@agiledood  
I concur.  
I had the exact same question before I found that my plugin came with a workflow event to attach, perhaps you can ask your plugin’s developer if they developed such event for you to use in the workflow.  
That being said, I’m still curious how to get the link for all my files in the file manager. I mean, maybe one day there will be files saved there without a workflow available, so it’s really important to know!

@tylerboodman  
I didn’t know they’re all in the same bucket, how scary is that for security reasons!?  
I tried Zpier+AWS briefly but didn’t have enough time to explore all the way before free trial ended.  
Do you use any integration to save files on other servers?  
Anything you recommend?  
Much appreciate it!
