bunnyway / bunnycdn.net.storage Goto Github PK
View Code? Open in Web Editor NEWThe official .NET library used for interacting with the BunnyCDN Storage API.
License: MIT License
The official .NET library used for interacting with the BunnyCDN Storage API.
License: MIT License
Hey,
Storage package does not have single file fetch
StorageObject xyz = bunnyCDNStorage.GetStorageObjectAsync(path);
And fullpath doesnt have base uri aswell.
https://cdn.bunny.test/test/file.jpg etc.
We are using BunnyCDN.Net.Storage as Data Manipulation. Can you merge "/api/purge" ?.
BunnyCDNStorage
HttpClient
public class HttpClient : System.Net.Http.HttpMessageInvoker
HttpMessageInvoker
public class HttpMessageInvoker : IDisposable
Hi,
I've run into upload timeout for large files, because this timeout is hard coded into the https://github.com/BunnyWay/BunnyCDN.Net.Storage/blob/master/BunnyCDN.Net.Storage/BunnyCDNStorage.cs (Line: 40).
For my demands I cloned it, but I really think it's should be able to get configured in the libary.
Jan
Performance since Task is a class whereas ValueTask is a struct.
If the values are not going to be changed after creation, then using a ** record struct **, and potentially even ** readonly record struct ** if data is immutable. The reason for doing this is that Object.Equals compares the values of the record, and not the reference.
BunnyCDNStorage should use zonename as object or enum
This is primitive obsession again.
Hi, would you mind adding a license? A MIT license or the sort would be great. Thanks
public string ApiAccessKey { get; private set; }
public string StorageZoneName { get; private set; }
As you may already know, I'm trying to get the project fully unit-tested to ensure functionality.
I'd gladly create a travis-ci config for continuous delivery to nuget which would only require internal setup on the travis platform and be configured using environment variables.
I would also like to add e2e unit-testing, would there be a possibility the project can have access to an unbilled e2e testing zone which we could use to ensure nothing in between broke?
Running this test before releasing it through the CI.would ensure no broken interfacing occurs in the released nuget package.
Only triggering it on tags would ensure there's no overuse or perhaps abuse of this zone.
Further feedback would be appreciated.
REASON: cleaner code and CopyToAsync performance
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement`
https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.copytoasync?view=net-6.0
using (var bufferedStream = new BufferedStream(stream, 1024 * 64))
{
using (var fileStream = new FileStream(localFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite, 1024 * 64))
{
bufferedStream.CopyTo(fileStream, 1024 * 64);
}
}
using var bufferedStream = new BufferedStream(stream, 1024 * 64);
using var fileStream = new FileStream(localFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite, 1024 * 64);
await bufferedStream.CopyToAsync(fileStream, 1024 * 64);
public long Length => should be ulong
public int ServerId => uint
public long StorageZoneId => ulong
In general, you should not be doing primitive obsession and be using "value objects", ie. for path, zonename, etc
Treating Primitive Obsession with Value Objects (Nick Chapsas)
Will this project be released on NuGet by any chance?
String interpolation in Exceptions, and other areas, causes boxing which reduces performance.
Stop Using String Interpolation When Logging in .NET (Nick Chapsas)
The model contains a field called GUID, yet it is a string. This does not make sense.
Series: Using strongly-typed entity IDs to avoid primitive obsession
The package is very nice and clear. But it needs a little more development;
Create Folder
Folder Name Update
Delete Folder
Issues like these need to be added.
In BunnyCDN.Net.Storage/BunnyCDNStorage.cs
In the Constructor of BunnyCDNStorage, it sets
_http.BaseAddress = new Uri("https://storage.bunnycdn.com/");
but when i use this. The messege says it is succeeded. But Actually it doesn't.
Upload file, messege 'complete', but no file on storage.
To fix this, I have to change to local uri "https://ny.storage.bunnycdn.com".
But i don't think this is what you intend to with this library.
I don't want hackky code. So please support this issue.
Fyi. I dev on Unity3D engine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.