Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-arcgis-portal-services

Package Overview
Dependencies
Maintainers
5
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-arcgis-portal-services - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

4

addon/services/items-service.js
import { copy } from '@ember/object/internals';
import Service from '@ember/service';
import serviceMixin from '../mixins/service-mixin';
import getImageAsBlob from 'ember-arcgis-portal-services/utils/get-image-as-blob';
import fetchImageAsBlob from 'ember-arcgis-portal-services/utils/fetch-image-as-blob';

@@ -131,3 +131,3 @@ export default Service.extend(serviceMixin, {

addImageResourceFromUrl (itemId, owner, filename, url) {
return getImageAsBlob(url)
return fetchImageAsBlob(url)
.then((blob) => {

@@ -134,0 +134,0 @@ // upload as a resources

@@ -5,4 +5,7 @@ /**

*/
export default function fetchImageAsBlob (url) {
return fetch(url)
export default function fetchImageAsBlob (url, options = {}) {
if (!options.credentials) {
options.credentials = 'same-origin';
}
return fetch(url, options)
.then((response) => {

@@ -9,0 +12,0 @@ return response.blob();

@@ -7,2 +7,3 @@ import { Promise as EmberPromise } from 'rsvp';

export default function getImageAsBlob (sourceUrl) {
console.error(`DEPRECATION: getImageAsBlob utility is deprecated! Please use fetchImageAsBlob instead as it will work with web-tier authentication.`);
// promisify this...

@@ -9,0 +10,0 @@ return new EmberPromise((resolve, reject) => {

@@ -5,2 +5,7 @@ # Change Log

## 1.3.2
### Changed
- `utils/fetch-image-as-blob.js` sends same-origin credentials by default
- `item-service:addImageResourceFromUrl` now uses `fetch-image-as-blob`
## 1.3.1

@@ -7,0 +12,0 @@ ### Fixed

{
"name": "ember-arcgis-portal-services",
"version": "1.3.1",
"version": "1.3.2",
"description": "A set of promise-based Ember Services for working with the ArcGIS Portal API.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc