I am building a website where I am uploading wallpapers on s3 bucket and I want users to be able to download those wallpapers from my website on the click of a button.
Earlier I was using simple anchor tag and download attribute to download the image file but now if I click on he download button my image just opens in full size in new tab.
I am not sure why this is happening and how can I Fix this. I want to be able to download the image on click not open it new tab.
Related
On Icloud.com it is possible to share a file with a URL link. If that URL is used within a browser you land on a page with an icon of the file; by clicking on that icon you can download the file.
Question: is there a way to change the URL so that clicking on the URL allows direct download of the file. This is possible on dropbox and I was wondering if there is a way to do this on iCloud.
I have a couple of mp4 videos I have stored in Amazon S3.
When I try to access the file's links from Firefox, they are played automaticlly, but when I try to open the same links in Chrome or IE the files are downloaded and not played.
I also tried setting the content type of the files to video/mp4 with no luck.
Doe's anyone know of a solution to this issue?
Try to store your videos with file_get_contents($videos) to s3 bucket , so that the stored video in bucket can get the original file content and then it can play on any browser
I created a button and assigned command to it. Once user clicks the button open file dialog (<input type="file"/>) should be displayed. When file is selected it has to be uploaded to the server. So what is the fastest way to show open file dialog and get user input?
First upload in Sitecore is not straight forward. If we take the example of the Package Upload Form, we see that it makes use of 2 aspx pages. Moreover, when uploading on the CMS, it will store the information into the database.
Possible Solution:
Create an Upload Form which will appear when the user clicks on the button.
When user selects a file, you will need first to upload it before being able to have access to it. Once uploaded, you just need to read the Zip file in order to know the structure.
Code Example:
Check the UploadForm.xml. Path: Website\sitecore\shell\Applications\Install\Dialogs\Upload package
You will see the 2 aspx pages in the same folder. The codebehind is found in the Sitecore.Client.dll
Thanks
I am working on an application where some videos are uploaded to Amazon S3.
Now a user can choose to download the video or stream it.
The public url on amazon s3 is say "amazons3.com/test/file.mp4".
As of now, everytime I visit the url, it streams the video.
How to I append parameters to the url so that the video can be streamed or dowloaded.
Basically, original url should stream the video, and modified_url should download it.
Thank you!
I found a very easy way.
In the html file, instead of
Download
I used
Download
Reference: href image link download on click
I am developing a e-commerce project using django.It is a image based project where user can download image after subscription.
There is a single image download subscription package available to the user where user can only download an image for a single time.My home page have an image thumbnail.
If any user wants to download any image ,he can click on the selected image and then will take the user in the image detail page of the clicked image with download button option.If he subscribed,he can download the image.
Though its a single image download subscription,so user can only download a single image.but the problem is,after a single download,if the user don't leave the page,he is able to download the same image for an unlimited time.I want to restrict it but i have no idea how to do this in django.
After a single download,redirecting the user to the home page or my image thumbnail page can be solution,but i don't think it will be great idea.Because there will be a possibility to disconnection of internet or something right after the download event which will create situation where may be the user can not complete the download action.
so i want to settle the user in the image download page after a single download and immidietly wants to clear the session and restrict him to download the same image for unlimited time.
Can it be possible to clear the session after a single download,i think if i can clear the session after a single download or an event or whatever you say,then the user can not download the image for twice.Is it possible to clear the current session after an event in django?