FoundryVTT-Drag-Upload icon indicating copy to clipboard operation
FoundryVTT-Drag-Upload copied to clipboard

Not able to drag upload

Open dhdodge opened this issue 3 years ago • 11 comments

I belive everything is configured correctly. Running foundry on raspberry pi 4. Foundry Data is located in /home/pi/foundrydata

when ever I try to dragupload anything. Nothing happens and I don't get any popups nor does anything get uploaded.

dhdodge avatar Jan 06 '22 22:01 dhdodge

Same issue, raspberry pi 4; foundry 9 build 241. Not seeing a dragupload directory created or any error messages related to dragupload either.

(Disabling all other modules shows no change in behavior.)

jmhnilbog avatar Jan 07 '22 01:01 jmhnilbog

Also can't drag upload in V9.

PhluXx1 avatar Jan 08 '22 04:01 PhluXx1

FYI the console is throwing these two errors.

image image

PhluXx1 avatar Jan 08 '22 04:01 PhluXx1

It is also not working for me. I am on FVTT v9, build 242, D&D 5e 1.5.6. I get no errors in the console, just nothing happens. On macOS 12.1

dczwardCZAR avatar Jan 12 '22 16:01 dczwardCZAR

Same for me, V9, same error message on console

Ychabod avatar Jan 12 '22 20:01 Ychabod

I don't have much experience with JavaScript but it appears to be having issues in the createFoldersIfrMissing function. The pert in particular seems to be "const targetLocation = game.settings.get("dragupload", "fileUploadFolder");" with the error being "This is not a registered game setting". Correct me if I'm wrong (this is the first time that I look into fixing something like this) but wont re-registering the setting in the new version fix this?

NickBProgramming avatar Jan 15 '22 03:01 NickBProgramming

Okay so I found a way to fix it as long as you don't use the amazon storage option. I've edited the module a bit so I can understand it more but for the first area with Hooks.once('init' ... you want to comment out the area below: Screenshot 2022-01-14 204441 This fixed it for me, if you have any questions let me know! c: NOTE: I know this is a super primitive way of fixing this but I don't use amazon s3 storage so I'm not too concerned.

NickBProgramming avatar Jan 15 '22 03:01 NickBProgramming

You can also replace the commented out area with the following:

let bucketChoices = {};
    try{
        const buckets = await FilePicker.browse("s3", "");
        if(buckets) {
            for ( let bucket of buckets.dirs) {
                bucketChoices[bucket] = bucket;
            }
        }
    }
    catch{
        console.log("Drag Upload | No S3 datapath.");
    }
game.settings.register("dragupload", "fileUploadBucket", {
    name: "If using S3, what S3 bucket should be used",
    scope: "world",
    config: !usingTheForge,
    type: String,
    default: usingTheForge ? "" : (FilePicker.S3_BUCKETS?.length > 0 ? FilePicker.S3_BUCKETS[0] : ""),
    choices: bucketChoices,
    onChange: async () => { await initializeDragUpload(); }
});

NickBProgramming avatar Jan 15 '22 04:01 NickBProgramming

Hi Nick, holy cow - the commenting out thing works. I use local storage, so I'm good there. THANK YOU for figuring it out, and hopefully it will assist Cody in making that fix part of the next release.

dczwardCZAR avatar Jan 15 '22 04:01 dczwardCZAR

@NickBProgramming because dev is now part of Foundry core team and may be busy with V10, could you please propose a PR so this can be propagated to all users?

apoapostolov avatar Jan 18 '22 16:01 apoapostolov

@NickBProgramming Would also like to see a pull request please. I'm surprised we've seen zero response from the dev its been almost 2 weeks now.

PhluXx1 avatar Jan 18 '22 16:01 PhluXx1