This returns a URL that looks like a path to the file download but when I go to it in my browser, nothing gets downloaded. I am hoping that when this server action is executed, the user gets the S3 file downloaded. Please let me know if this is possible!
If your files are public then you can link directly to them, for private files you need to use the signed download url. The server connect action returns indeed an url, it is a temporary link that can be used to download the file, it can only be used within a certain timeframe. You could for example use the download component to download the file automatically. On the load event of the server action trigger the download method on the download component with the returned url.
Does the server download take remote URLs? From the Wappler tutorial, it only seemed like it was local paths. When I tried it with the returned AWS URL I got:
No, you need a client-side download. If you want to do it on the server then you need to download the file to the server first and then send it further to the client.
A button who takes the value and on click it pass to the signed download server connect (I add a variable in GET, which get the full key name, like: â/test/logo.jpgâ)
then âSuccessâ about download server connect, I select Go To from Browser component and as URL I put the signed URL.
Hi @patrick and @Teodor,
could you give a more detailed instruction on how to download from S3 with the download component (not public available file)?
I have a dynamic generated repeat with several documents. I now want to download the file on button click. I want to send the document id to my Server Action to get the signed URL.
This is how I have set up my Server Action:
could you explain how to download from a S3 bucket with the download component? I could not find out how to do this. The way @updates shows with the browser component works but I would prefer using the download component.
I have only PDF documents to download and would like them to download directly instead of opening in the browser.
Hi @Teodor
Did you already have the time to make some screenshots on how to download a file from s3 with the download component like @patrick mentioned in the post above?