Giter Club home page Giter Club logo

Comments (12)

jchristn avatar jchristn commented on June 10, 2024 1

I assume this is more like what you are expecting? (from the Test project) By the way, I completely agree with you, and am thankful that you found this issue. I hadn't even considered prefixes/folders!

I made a new version (2.1.4) and gave you credit in the README/commit. Please let me know if this works the way you expect!

Cheers,
Joel

NuGet: https://www.nuget.org/packages/BlobHelper/2.1.4
Commit: f4dd054

from blobhelper.

jchristn avatar jchristn commented on June 10, 2024

Interesting.

A simple test on my side:

C:\Code\Misc\BlobHelper-2.1\Test\bin\Debug\netcoreapp3.1\blobs>dir
 Volume in drive C has no label.
 Volume Serial Number is 48F9-B0CE

 Directory of C:\Code\Misc\BlobHelper-2.1\Test\bin\Debug\netcoreapp3.1\blobs

10/06/2021  03:34 PM    <DIR>          .
10/06/2021  03:34 PM    <DIR>          ..
10/06/2021  03:32 PM                 6 foo1
10/06/2021  03:32 PM                 6 foo2
10/06/2021  03:32 PM                 6 foo3
10/06/2021  03:32 PM                 6 test1
10/06/2021  03:32 PM                 6 test2
10/06/2021  03:32 PM                 6 test3
               6 File(s)             36 bytes
               2 Dir(s)  239,187,968,000 bytes free

Using the Test project:

C:\Code\Misc\BlobHelper-2.1\Test\bin\Debug\netcoreapp3.1>test
Storage type [aws azure disk kvp komodo]: [disk]
Directory : ./blobs/
Command [? for help]: enum
Token:

foo1                       6 bytes           2021-10-06 22:34:46
foo2                       6 bytes           2021-10-06 22:34:46
foo3                       6 bytes           2021-10-06 22:34:46
test1                      6 bytes           2021-10-06 22:34:46
test2                      6 bytes           2021-10-06 22:34:46
test3                      6 bytes           2021-10-06 22:34:46

Count: 6
Bytes: 36

Something definitely seems strange here.

What do you see when you execute dir against the storage directory? Would love to debug this one with you, this is really strange.

Have you also tried using ./storage/ as the path in DiskSettings?

from blobhelper.

shortcord avatar shortcord commented on June 10, 2024

I discovered this issue while writing a small ASPNET Web API, I'm dynamically generating the directory so I can't reliably prefix the folder with ./.

That being said, I tested it with a statically set directory.
I'm still not getting any blobs.

Output of dir on the folder in question:

    Directory: D:\Projects\S3Testing\S3Testing\bin\Debug\netcoreapp3.1\backend-storage


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         10/6/2021   8:02 PM                Comic 1
d-----         10/6/2021   8:02 PM                Comic 10
d-----         10/6/2021   8:02 PM                Comic 11
d-----         10/6/2021   8:02 PM                Comic 12
d-----         10/6/2021   8:02 PM                Comic 13
d-----         10/6/2021   8:02 PM                Comic 14
d-----         10/6/2021   8:02 PM                Comic 15
d-----         10/6/2021   8:02 PM                Comic 16
d-----         10/6/2021   8:02 PM                Comic 17

Output from the test program with my content copied to the output folder.
image

from blobhelper.

jchristn avatar jchristn commented on June 10, 2024

Can you try with an explicit path in your code (D:/foo/bar/) instead of a relative path (./ etc)? I suspect some foul play from the environment.

from blobhelper.

shortcord avatar shortcord commented on June 10, 2024

I have tried that.
For giggles I also just did that with the test program, still the same output.
image

I'm not sure if the environment is to blame, I don't have anything special with my install or harddisk setup.

As a sidenote, I pulled down the src and messed with the DiskEnumerate method, changing lines 1085 and 1089 to use Directory.EnumerateFiles with the SearchOption.AllDirectories and got some content.

It's not exactly like S3 output but its a start.

from blobhelper.

jchristn avatar jchristn commented on June 10, 2024

I'm not sure why I didn't get a notification of your last comment. Sorry about that, I'm just now seeing it.

Did you try with a trailing '' also? This is really strange, I have zero issue on any framework with any local directory (and have tried using both '' and '/')

from blobhelper.

jchristn avatar jchristn commented on June 10, 2024

Did this commit in your fork fix the issue for you? https://github.com/teh-random-name/BlobHelper/commit/0b269608e0c07fa5bd4657c8f34f39e8311086b8

from blobhelper.

shortcord avatar shortcord commented on June 10, 2024

Sorry been busy lately.
Yea I believe that commit fixed it, I have a few other things on my working copy that fill in some missing parts on the disk storage.

I guess it would have been better to open up with "I expected Blobs.Enumerate() to be recursive when using DiskStorage".
As it stands, using S3, when I enumerate the bucket, it recurses into every folder, when I do the same with DiskStorage it just shows files if any.
I bold files cause my directory only had folders, creating an empty file and listing showed said file but no folders, that is what threw me off at first.

from blobhelper.

shortcord avatar shortcord commented on June 10, 2024

Oh also that commit is missing a fix for uri generation and a few other things, I believe I still have that in my local copy.

from blobhelper.

shortcord avatar shortcord commented on June 10, 2024

I'll give it a test this weekend, thanks!

from blobhelper.

shortcord avatar shortcord commented on June 10, 2024

Yup all looks correct!
Thanks again for updating it.

There are some other things I'd like to have in the library when dealing with local files but that will be for another day.

from blobhelper.

jchristn avatar jchristn commented on June 10, 2024

Awesome! I'd love any suggestions or pull requests :) glad it is to your liking

from blobhelper.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.