-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1.9.1, corresponding to September 2018 release of ArcGIS Online
- Loading branch information
Showing
122 changed files
with
7,328 additions
and
6,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "cascade-storytelling-template-js-dev", | ||
"version": "1.8.3", | ||
"version": "1.9.1", | ||
"homepage": "", | ||
"authors": [ | ||
"Gregory L'Azou <[email protected]>" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...torymaps/tpl/builder/mediaPicker/browsePanel/sidePanel/FileUploader/AudioUploadHelper.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import constants from '../../../constants'; | ||
|
||
/* ----- main function to export ----- */ | ||
|
||
// need to return | ||
// { | ||
// type: 'audio' // since this is the audio helper, we shouldn't have gotten here on a different media type | ||
// file: the original file | ||
// thumb: need some sort of datauri maybe with an icon? | ||
// } | ||
|
||
const loadAudioFromFile = function(file, isSingle) { | ||
return new Promise((resolve, reject) => { | ||
handleAudioFile(file, isSingle).then(resolve).catch(reject); | ||
}); | ||
}; | ||
|
||
const handleAudioFile = function(file, isSingle) { | ||
return new Promise((resolve, reject) => { | ||
// do some client-side processing to make sure the gif isn't too big | ||
// (either in dimensions or filesize); | ||
|
||
// since we can't resample or resize audio client-side, first check the filesize. | ||
// if it's too big, no sense in continuing... | ||
if (!validateFileSize(file)) { | ||
console.warn('gif file size too big!'); | ||
reject({reason: 'filesize'}); | ||
return; | ||
} | ||
|
||
resolveWithData({file, isSingle}, resolve); | ||
|
||
}); | ||
}; | ||
|
||
/* ----- UTILITY FUNCTIONS ----- */ | ||
|
||
const resolveWithData = function(options, resolve) { | ||
options.img = options.img || options.canvas; | ||
resolve({ | ||
type: 'audio', | ||
file: options.file, | ||
dataUrl: options.isSingle | ||
}); | ||
}; | ||
|
||
const validateFileSize = function(fileOrBlob) { | ||
return fileOrBlob.size <= constants.fileSettings.maxFileSize; | ||
}; | ||
|
||
export default { | ||
loadAudioFromFile | ||
}; |
Oops, something went wrong.