Search Posts

Category: amazon-s3

Angular – S3 – CloudFront – SEO – How to return 404 status code for invalid route?

My site is written in Angular, stored in S3, distributed via CloudFront. To make my Angular site work, i have created a custom error code response in CloudFront which returns 200 code for 404 code. However, this setup is hurting SEO. My Angular site must return 404 code for invalid route instead of 200. The problem is that how could I differentiate an invalid route and a valid route, but a nonexistent object ID in […]

Safari Issue with Single Page Application AngularJS in HTML5mode with AWS (Cloudfront/S3)

I am running an AngularJS application in S3 and served up in a CloudFront distribution. I chose a CloudFront distribution for performance and the simplicity of installing the SSL certificate. The SPA is in HTML5mode to have a clean URL structure. I configured html5Mode in my app.js file. .config([‘$locationProvider’, function($locationProvider) { $locationProvider.hashPrefix(”); }]).config(function($locationProvider){ $locationProvider.html5Mode(true); }) In my index.html file I set the base tag as follows: <base href=”/” /> I have an S3 bucket serving […]

Best practice for storing server endpoint configurations for static web application

We are hosting our Angular based static web application on AWS S3. This web application tries to access AWS Lambda based backend via APIGateway or directly access using AWS Javascript SDK. But these endpoints are embedded in our web application and we try to move these static endpoints to configuration file decoupling from the web application to make them dynamic. What is the best practice to accomplish this?, storing endpoints in Dynamodb table and accessing […]

AIESEC logo instead of the designated logo

Recently, we renamed the logo of our angular application (website) from something_else.png to logo.png. Most of the times it appears fine. However, at least on three different instances (where users were on three different internet connections), the users have reported that instead of the logo of the website they see the logo of AIESEC. When they reload the page or view the page in Chrome incognito, the logo comes back to normal. The Logo is […]

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 = https://s3.amazonaws.com/thdoc/ ; $scope.download = 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: item._file.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 […]

Next Page »