Skip to content

Conversation

@cwillisf
Copy link
Contributor

Resolves

Resolves #7

Proposed Changes

When calling load, you may now explicitly state a data format / file extension. If you don't
specify one, the default for that asset type will be used.

Reason for Changes

This allows loading assets whose file extensions don't match the default data format. For example, this allows loading JPEG-format backdrops.

Test Coverage

I added several test cases to the "download known assets" integration test. These new cases ensure that we're covering load both with and without specifying the data format, as well as explicitly specifying a non-default format.

When calling `load`, you may now explicitly state a data format / file extension. If you don't
specify one, the default for that asset type will be used.

Resolves scratchfoundation#7
@cwillisf cwillisf force-pushed the override-data-format branch from 5cd2a7e to 19f4699 Compare May 24, 2017 23:31
@rschamp rschamp added this to the June 21 milestone May 26, 2017
const assetInfo = testAssets[i];

const promise = storage.load(assetInfo.type, assetInfo.id);
var promise = storage.load(assetInfo.type, assetInfo.id, assetInfo.ext);

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@rschamp rschamp removed their assignment May 31, 2017
@rschamp rschamp merged commit cf940e3 into scratchfoundation:develop Jun 2, 2017
@cwillisf cwillisf deleted the override-data-format branch June 6, 2017 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants