How to generate links for a page like pastebin

hey, It is not long ago that I started using bubble and I really liked the ease of etulisation etc … I wanted to create a project / site which consists in publishing bins / code / text / files like pasteBin and I want to generate page for each post and at eg: myApp.com/bin/customName and inside this page it will have the post / text and files shared except I don’t know how to do it :sob: help me please thank you in advance

I want to do :

  • Post a text/code with files
  • Generate a page for the post & link for download the files

Hi, @arosaotyahoa

Welcome to the Forum :slight_smile:

To make a custom URL, all you need to do is go to the page properties (double click on the page in the editor and get the dark grey box) and change the type of data to ‘bin’.
Now, wherever you run the workflow to navigate to this page, pass data to the page and select the specific ‘bin’ item that you want to pass to this page.
Now you should be able to see the bin’s unique id appearing in the URL bar every time you land on the bin page from that navigation workflow.

If you add a way to set the bin’s slug, the unique id in the URL will be replaced by the slug. So essentially, the slug is your customName.
You could set this slug value in the same workflow that the bin is created in or you could allow users to set and change the slug value. The URL for that bin will change accordingly.

To host files and text, all you need to do is add a ‘myTexts’ value of type text as a list and a ‘myFiles’ value of type file as a list in your ‘bin’ data type.
And on the bin page, you simply create 2 repeating groups - one for myTexts and one for myFiles - they will have their data source as ‘Parent Bin’s myTexts’ and ‘Parent Bin’s myFiles’.

Hope this helps.

In case you need more help, I’ll be happy to guide you through it over a video call. Let me know how it goes!

Cheers,
Ranjit | Blur Apps

thanks for your reply thats very helped me :blush: now i want to do expiry time for the bin

Just run workflows only when bin expire time < current time and filter your searches similarly. Or run a workflow to check a has_expired checkbox which mean that the bin cant be displayed.

and how to generate the link for download the host files ?