Upload larger video files?

Hey Forum,

I am interested in uploading videos to my bubble app. I am open to however anyone can do that that is the most cost-effective. It doesn’t seem that Bubble is the way to go.

Does anyone have experience uploading to another service, like Vimeo? Two plugins in the market can “upload” videos to Vimeo after authenticating. Still, I’d prefer to have it connect with whatever API keys necessary instead of creating an account using Vimeo credentials.

Does anyone have any ideas? I like Vimeo as their prices are really reasonable compared to bubbles. :frowning:

Let me know!

Happy Holidays,
Benjamin

Vimeo’s API documentation is very good, so setting up via the API connector in Bubble is pretty simple.

You need to decide which of their upload approaches to use for your app, and then you can create the upload process and API calls around that.

Uploading Videos with the Vimeo API | Vimeo Developer

Hey @Adam,

Thank you. I was able to get this working with one issue. The redirect URL is being ignored and it’s not redirecting. I found on the internet that others have experienced this and solved it by adding a value to the Accept header.

I created a shared header and populated the fields and it still redirects to Vimeo’s default page. Clearly, this isn’t my strength Ahah. Any suggestions? I’m very resourceful, but I can’t find anyone who uses the API connector in relation to Vimeo in the forum.

I would appreciate any guidance. Thank you!
Benjamin

Do yo mean the ‘Redirect approval company URL’? You can set that in your Vimeo developer account, on your app settings. You’ll find your OAuth redirect URLs there as well.

To upload to Vimeo you’ll need to use the ‘OAuth1 User-Agent Flow’ authentication method in the Bubble API connector.

Then add all the details for redirects, your app keys, and your scopes in the authentication panel:

Then add your auth token and the Accept key (as you’ve done above) as shared headers, then you’re good to go.

Thank you for taking the time to draft this all out for me @adamhholmes. Unfortunately, this got me further away from working. Before, I could get an upload to happen, but it wouldn’t bring them back after. Bringing them back would have the Video ID as a parameter that I have an input getting from the url.

With these changes, now the upload form doesn’t load.

I have two questions: what do I paste and where now that all of these changes have been implemented.

  1. App ID - what is this and where do I find it? Client Identifier?
  2. Under the shared header Authorization: is that the access token?

I’m sorry. I am just learning how to use the API Connector and have done some pretty cool things with it, but usually its more straight forward than Vimeo. Also Vimeo’s documentation doesnt seem to be searchable, so its a bit harder. :frowning:

Thank you for helping though,
Benjamin

No problem,

It’s been a while since we set up our integration with Vimeo but, as I remember, it was definitely one of the more involved integrations we’ve made.

Before working with the Vimeo API you need to register your app with Vimeo (use the link below).

Vimeo Developer API

I think they have to approve it before they will give you upload permission, but once approved you can access all your app API details from within their app management portal (your api keys, scopes, auth tokens, redirects etc.)

Their getting started guide explains in more detail:

Getting Started with the Vimeo API | Vimeo Developer

Once you’re all set up and have permission to upload, you have 3 options for the method used to upload videos to your Vimeo account - they each have pros and cons, so deciding which is best for your app will depend on your use case.

(We currently use the ‘pull method’ as is the easiest to set up, and probably gives the cleanest UX for the user, but it does require additional storage for the uploaded videos, even if it’s just temporary - we use AWS s3. We are looking at setting up the TUS method, but so far it’s proved much more challenging to set up, so for now we’re sticking with the pull method).

@adamhholmes, I had this mostly working from following their documentation. What I couldn’t get working is the redirect after upload back to my app, hence this post ;).

After following the directions you mentioned above with the screenshots, I can’t get the upload form to show anymore, let alone get the redirect to work? It seems that in your last post, you want me to figure it out on my own, but after making the changes you suggested, the upload form wont load. Two fields are being asked for, and I have no idea what it’s asking. Nowhere in the documentation does it mention APP ID. I was able to find the information for authorization, so that shouldn’t be an issue anymore.

When making the upload call, I followed their documentation and it worked (except the redirect). Then I made the above changes, and the upload form doesn’t show. I think it’s because I don’t know if I have the right APP ID. Is that the Client Identifier? Because if it is, that is what I put in for APP ID.

I can go back to how I set it up before, but I need help redirecting. I can have the users copy and paste the video id and click the back button, but if that is what it is supposed to do naturally, that doesn’t make sense.

I’m sorry if I seem frustrated, but this would need to be completed by tomorrow. I know it’s not your issue, but I was hoping you could help me if you understand more about this.

Sorry for seeming short, and I appreciate any help, really!

Thank you,
Benjamin

Ah, sorry, I didn’t answer the two specific questions you asked before…

  1. yes, the App Id in the API connector is your client identifier (set it the same for both live and dev versions).

  2. Yes, under the shared header Authorization that is indeed your access token (make sure you write 'bearer ’ with a space, and the the token.

@adamhholmes, Thank you! However, after doing all of that, the upload form no longer works :(. What do you think I could be missing?

Thank you again!


![Screen Shot 2021-01-06 at 11.37.28 AM|690x403](upload://ev 6FH2ISCOWSiTx96Me4lzQSwA3.png)

It looks as though you’re running the API as a ‘data’ call, rather than an ‘action’.

It needs to be run as an action, which is probably best run on page load.

As I said before, I don’t personally use the ‘post’ method to upload (although we did experiment with it), so I’m not that familiar with how it works, but I just ran a quick test with it and managed to get it working fine.

The easiest way is to have a group on your page with a datatyp ‘text’, and have your HTML element inside that group, with the content set to be the parent group’s text.

Then, on page load run the workflow to get the form html, then in the same workflow run an action to display the result of step one in the group which contains the HTML element

That should cause a new form to be created and displayed every time the page is loaded ready for a new upload.

AHAHAHAHA @adamhholmes, That got the upload.form to show again, :slight_smile: phew. However, it still doesn’t redirect back to my supplied redirect URL. This is so frustrating. I am sorry that you’re involved in this. I understand if you are not interested in helping me figure this out, but what do you think the next step might be.

Take a look at what is happening: https://www.loom.com/share/d29be2ce6a0745b6928f2848d4dfbcc8

The redirect URL in the Vimeo developer dashboard is upon authentication, which they are not authenticating into their accounts, so that URL is irrelevant here.

I don’t know that the method we are using here is really relevant also; I followed all of the instructions, I think lol.

Mainly, I am asking if you can see if I am missing something. :frowning: Thank you again.

Again, I am sorry.

Benjamin

@adamhholmes, I’m reaching out to Vimeo! ahah!

1 Like

I can’t seen any difference now between what you’re doing and what I did in my test, yet I’m able to redirect to any url without issue - so I really can’t work out what the issue is I’m afraid.

Hopefully Vimeo can shed some light.

Hi again @ben4,

Maybe something like this will work?

  1. In the body:

     {
      "upload": {
         "approach": "post",
         "size": "<size>",
         "redirect_url": "<redirect-url>"
       }
     }
    

So your default redirect url would be here instead like this:

@adamhholmes

Yeah, hopefully :slight_smile: Thank you!

Got the form back, but the upload redirect url still doesn’t work… ahahah. Thank you though!

I’ll do whatever I need to do to get an upload to happen from my website. lol. I’ll even pay someone to do it.

As I mentioned before, I personally use the ‘Pull’ upload approach rather than the form based one, as it’s seemingly simpler to set up than the other 2 methods, and gives a better user experience, so you might want to consider that instead.

Originally we tried to use TUS, but couldn’t get anywhere despite speaking with both Bubble, and Vimeo - who both recommended using the ‘Pull’ approach.

The benefits, as well as being much more straight forward to set up, are that you can fully control the UX inside Bubble, with full control over the design and upload process including having attractive progress bars during download, and completion messages etc. without the user ever leaving your app.

The only (small) downside is that you have to take into consideration storage space (and possibly cost) wherever it is the user initially uploads the video to (although you don’t have to store it permanently so it’s not really an issue) and if that’s not on Bubble then you’ll need an extra integration to set that up (i.e with AWS).

But it might be worth considering and looking into (personally I’d recommend it over the form method, and it’s what both Bubble and Vimeo recommended to me when I discussed it with them last year).

so you are uploading to bubble and pulling from the bubble upload? Are you not deleting after upload?

We upload to AWS then pull from there to Vimeo (as Bubble storage is limited, and we were concerned about multiple users attempting to upload at once, or uploading multiple files).

We were planning to delete uploaded videos as soon as the upload to Vimeo was complete, but so far we haven’t bothered as s3 storage is so cheap, so we’ll probably keep the original uploads as backup at least for now.

It was a bit of a pain to set up the AWS integration, but once it’s done it all works fine (of course you don’t have to use AWS - uploading straight to Bubble is fine in most cases if you delete the upload once the transfer is complete).