-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1817 from qdraw/feature/202411_psd
Add support for PSD to display in files && fix fileListCache issue
- Loading branch information
Showing
11 changed files
with
210 additions
and
17 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
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
36 changes: 36 additions & 0 deletions
36
starsky/starskytest/FakeCreateAn/CreateAnImagePsd/CreateAnImagePsd.cs
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,36 @@ | ||
using System; | ||
using System.Collections.Immutable; | ||
using System.IO; | ||
using System.Reflection; | ||
using starsky.foundation.storage.Storage; | ||
using starskytest.FakeMocks; | ||
|
||
namespace starskytest.FakeCreateAn.CreateAnImagePsd; | ||
|
||
public class CreateAnImagePsd | ||
{ | ||
public readonly ImmutableArray<byte> Bytes = [..Array.Empty<byte>()]; | ||
|
||
public CreateAnImagePsd() | ||
{ | ||
var dirName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | ||
if ( string.IsNullOrEmpty(dirName) ) | ||
{ | ||
return; | ||
} | ||
|
||
var path = Path.Combine(dirName, "FakeCreateAn", | ||
"CreateAnImagePsd", "test.psd"); | ||
|
||
Bytes = [..StreamToBytes(path)]; | ||
} | ||
|
||
private static byte[] StreamToBytes(string path) | ||
{ | ||
var input = new StorageHostFullPathFilesystem(new FakeIWebLogger()).ReadStream(path); | ||
using var ms = new MemoryStream(); | ||
input.CopyTo(ms); | ||
input.Dispose(); | ||
return ms.ToArray(); | ||
} | ||
} |
Binary file not shown.
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
61a82ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://starskyapp.netlify.app as production
🚀 Deployed on https://67322cc48a62cd501287e732--starskyapp.netlify.app