How does "Upload Files" component 3.0.0 work?

Hi,

I upgraded my “Upload Files” component to version 3.0.0 and now I dont get it up and running.
I use the PUT http method but there is no request sent to the server. My file object is returned at Output 1.
Do you have an example for the input parameters which works for you with the PUT method?

Thanks,
Jo

Hi there!

Could you post a screenshot of the upload flow? Are you using AppGyver Cloud Storage?

Here you go.
I use pick files with “pick multiple files” = false
With the second “set page variable”, I add the uploadUrl with the formula
tmpFile = [SET_KEY(outputs[“Pick files”].files[0],“uploadUrl”,appVars.urlImgUpload)]

Then I set the Upload Files properties as follows:

The first output is triggered, but no HTTP request it sent to the server (according to Network traffic in Chrome). Also there is no message in the console which could indicate that something went wrong.
I am using a custom server.

I was able to reproduce the problem. The upload files function needs a little fix for it to work with s3 buckets other than our own, but we should have it updated soon!

Thanks. I am not using any S3 bucket but normal REST API, is this then the right flow function for an upload? (at least it worked before)

I am also having a similar issue. I am trying to upload an image to firebase storage via the Upload Files flow, but it doesn’t seem to work.

Here’s my current flow:

  1. Pick image from library
  2. Set image as page variable (object)
  3. Upload files:
    Method: POST
    Files to upload: [SET_KEY(pageVars.image, ‘uploadUrl’, “https://firebasestorage.googleapis.com/v0/b/etc…”)]

But it doesn’t work…

Any suggestions?

Hey, @Marco_Volpato @Johannes - Fix to this will come very soon, currently it is only possible to upload to the S3, sorry about that. And yes this is the correct flow function, there was just bit of a misunderstanding on my part when I was making the changes.

Works now, thanks for the fix!

Yep, works now! Thanks for the update!

I have another question… I have setup authentication with Firebase as well. Users are able to signup, create posts, add images, but I can’t seem to figure out how to assign the user to post they create?

I was thinking to add the firebase user UUID as a page param (or app param) and then when they upload the post it adds their UUID as a field in the post, but i’m not sure how to GET the UUID from firebase?

Any suggestions here? I know it’s quite a niche question, but I’m sure others have either tried/succeeded in doing this.

Thanks!!

I haven’t really used Firebase before, but I’m sure that it is possible to “GET”(in quotes because you use POST request to authenticate) the UUID once the user logs in/authenticates, and then save the response from that. And if the Firebase does not send the user token in the response, then it needs to be configured.

This same UUID is used also for e.g. someone likes a post, you should send the user UUID with the like request, so that the Firebase knows who liked the post. Please ask if you still have some questions. :slight_smile:


Firebase documentation
Users in Firebase Projects

Hey @Marco_Volpato or any other Firebase user…

Did you manage to make the “Upload files” work with Firebase Storage? Would you be able to share a short hint to how you did it?

I tried you mentioned flow with but do not get it to work (I confirm my rules are read/write and it works when testing with Postman).
Upload files:
Method: POST
Files to upload: [SET_KEY(pageVars.image, ‘uploadUrl’, “[https://firebasestorage.googleapis.com/v0/b/myuploadfolder”)]

Thank you very much in advance,
Carlos.

bump… I would like to know too please?

@Johannes - if you have the time , could you explain how you got this to work please? Did you use S3 bucket? How did you build the Header for the Auth etc?

Still no luck in getting any upload working. Many thanks

@Sim_Sim unfortunately I cannot help in your case as I did the file upload against a custom API with basic auth…sorry

I posted a tutorial on this Here

1 Like