pingvin-share icon indicating copy to clipboard operation
pingvin-share copied to clipboard

🚀 Feature: Keep folder structure when uploading folder

Open SparroWServ opened this issue 2 years ago • 8 comments

🔖 Feature description

The ability to share a folder/directory

🎤 Pitch

I have had a couple times where I've wanted to send a few folders with their contents to someone, but would create either a couple shares of basically the contents of the directory OR just use onedrive if the folder was small enough and sent it that way. I think it would be greatly beneficial to myself and others to send directories/folders.

Thanks!

SparroWServ avatar Jun 15 '23 01:06 SparroWServ

@SparroWServ I don't think this is possible using only JavaScript in a navigator. Indeed the navigator cannot access an entire folder, to search all the files recursively, because it has no authorization to do it, so the navigator only have access to a single file, the one that is given by the user. I might mistake about this but I don't think this is possible.

If you want to send entire folders or multiple files in one, you can zip your content, using 7Zip or WinRAR. You select the files and folders you want to compress, and then it creates a file that you can transfer using Pingvin or any other sharing platform.

Hope that helps.

pierrbt avatar Jun 23 '23 00:06 pierrbt

I honestly can't believe I didn't think about zipping the file. I guess I thought of Zips as Directories. I appreciate the response and will use that in my future sharings.

Thank you!

SparroWServ avatar Jun 23 '23 00:06 SparroWServ

@stonith404 Well, I've told this guy that we couldn't load a folder, but when we drag n drop a folder, it put all the files, do you think it is possible to get the structure of the ended file by the navigator or we don't have any info about this?

pierrbt avatar Jun 25 '23 19:06 pierrbt

@stonith404, I've made a big mistake by saying that we couldn't load entire folders. Indeed the FileUpload[] object sent by the Mantine Dropzone sends the full path, from the sent directory. We could then retrieve the folders (only those which are containing files).

Maybe we should consider reopening this issue after setting a correct name.

Here is an example of the sent object:

[
    {
        "path": "/ArduinoData/cache/cache.json",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/cache/downloads.arduino.cc/libraries/library_index.json.gz",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/cache/downloads.arduino.cc/libraries/library_index.json.sig",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/cache/downloads.arduino.cc/packages/package_index.json",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/cache/downloads.arduino.cc/packages/package_index.json.sig",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/library_index.json",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/library_index.json.sig",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/package_index.json",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/package_index.json.sig",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/preferences.txt",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/staging/libraries/Adafruit_BusIO-1.14.1.zip",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/staging/libraries/Adafruit_GFX_Library-1.11.5.zip",
        "uploadingProgress": 0
    },
    {
        "path": "/ArduinoData/staging/libraries/Adafruit_SSD1306-2.5.7.zip",
        "uploadingProgress": 0
    }
]

pierrbt avatar Jul 05 '23 19:07 pierrbt

@pierrbt Oh okay, I didn't know that this is possible

stonith404 avatar Jul 09 '23 15:07 stonith404

Yes it would be interesting. The problem is that it only shows folders in which there is files. But others services as Wetransfer add a popup to Ask permission, surely to Access empty folders

pierrbt avatar Jul 09 '23 15:07 pierrbt

I would just like to bump this as it'd be a great feature to have.

I am not keen on the idea of having to zip up folders and upload them as it defeats the purpose of just allowing the end user to download the specific file they need. Having a folder structure would be great as it would also save me from creating separate shares for each folder and allow for everything require to be in the one.

Hopefully something to consider for future versions!

Thank you and great job on Pingvin!

JohnDoe-dev-spec avatar Feb 26 '24 11:02 JohnDoe-dev-spec