Search Posts

Category: amazon-s3

Angular how to download file from S3 Amazon using ng-click

I am trying to download a file from my amazon S3 bucket by using angular ng-click. But instead of file it returns me with blank file on download. HTML <div class=”details-field”> RC Book <font class=”digit” >({{rcCount}})</font> : <i class=”fa fa-angle-down fa-button” ng-click=download() ></i> </div> Angular script var awsUrl = ; $ = function() { $http.get(awsUrl, { responseType: “arraybuffer” }) .success(function(data) { var anchor = angular.element(‘<a/>’); var blob = new Blob([data]); anchor.attr({ href: window.URL.createObjectURL(blob), target: […]

How to upload images in s3 bucket using angular ng2-file-upload?

Here which code should need to change for upload images on s3 bucket. uploader: FileUploader = new FileUploader({ url: URL, disableMultipart: true, formatDataFunctionIsAsync: true, formatDataFunction: async (item) => { return new Promise((resolve, reject) => { resolve({ name:, length: item._file.size, contentType: item._file.type, date: new Date() }); }); } }); Thanks in advance. Source: AngularJS

how to list all the objects from AWS with the type?

In my AWS s3 bucket I have a folder called my-folder which having 2 files and one folder below is the structure my-folder ——newdata.pdf ——backtick.doc ——jpg ——red-rose.jpg I want to show the same way in front view for users for that I a using angularjs directive. click here based on my response value I have to change the json using aws-sdk I am fetching all the objects here is the code router.get(‘/getall’, function(req, res) { […]

Angular – Error Unknown error has occurred

I am working on a application hosted on Amazon S3 , Seems like a Angular Application , I was trying to setup SSL on Amazon S3 Using cloud front , and after doing that application is suddently throwing error Unfortunately, i was working on production version and not sure whats going on this, the structure inside Amazon look like this. I have no idea whats i have done ? Any help please? Source: AngularJS

Image from Amazon S3 Bucket didn’t display in first request

I am facing a unique problem and I am not able to understand the reason behind this. I have Amazon S3 account and I create bucket where I kept my uploaded images. I am using following code to retrieve the image. My issue is unique because when I am retrieving the image in first request then it is not showing anything on webpage but the image is getting retrieved after subsequent request and display to […]

Retrieve image from Amazon S3 private bucket using Angular JS

I am using Angular JS and WEB API for one of my website. As per requirement of website I am using Amazon S3 to store image in the bucket. I am using WEB API to upload image dynamically in my Amazon S3 Bucket using accesskey and secretaccess key. But now I want to display those uploaded images(not all at once) in website using Angular JS. Please note that bucket is not public. Can anyone please […]

Show pdf and docx in html using angularjs and AWS S3

I’m working with AngularJS and AWS S3 and I’m trying to view the files(.pdf, .docx, .ppt, etc..) in the browser but I’m stuck. I’m trying to use the google docs view: <iframe src=””></iframe> But I’m getting this error in console’s browser and obviously the view of this doc is not working. Anyone know what is happening? Could be a S3 permissions error or maybe its because angularjs doesn’t support it? EDIT: I’ve tried this to […]