How to download an uploaded file in Cloudinary

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How to download an uploaded file in Cloudinary



i'm currently working on how to download an uploaded file in Cloudinary.



In my views/declarations/index, I want a button to download the file the user uploaded at the Declaration.create.


views/declarations/index


Declaration.create



I've tried the this :


<% @declarations.each do |declaration| %>
<tr>
<td><%= link_to("Download", cl_private_download_url(declaration.facture, :png, :attachment => true)) %></td>
</tr>
<% end %>



But all I have is something like this : #Attachinary::File:0x00007fa7deca0f20



Does one of you know how could I do this ?



Many thanks,





You need to link to a controller method that actually handles the file transfer. This method receives the declaration ID, pulls the record, fetches the file, and serves it.
– bo-oz
3 hours ago





Have you also tried this btw, seems you can get a direct download link afterall: support.cloudinary.com/hc/en-us/articles/…
– bo-oz
3 hours ago





Thanks for you answer. Yeah, I just saw this website before you posted it :p But it returned me an error : Invalid Signature. Gonna find out what is this.
– Enner31
3 hours ago





This is still not working ... I've update my answer, if you have any other solution.
– Enner31
5 mins ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

pi,qs 30W328x,RiVe1boAUbUl8P2cAcdBFcNECSGAh 6IQV39rRGidi6VpRp HkoVNE7 mtGYv4Al1UdWdU p,ZdB8d21o vQ 1
B,SANTM5Gz Ob2 hmeU W6utGCnd6ynG,k qs,9h,1jxwu

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham