panel icon indicating copy to clipboard operation
panel copied to clipboard

Pull remote files button (v2 backport)

Open Boy132 opened this issue 3 years ago • 8 comments

A backport of v2's pull remote file button. (https://github.com/pterodactyl/panel/commit/3c2a6e11360001cbc33d170af2fa6cabe7866481)

Updated to the new dialog/ button styling. image

Boy132 avatar Jul 01 '22 12:07 Boy132

I've given this some testing and it doesn't actually seem to pull the files (I could be doing this wrong, so please let me know).

I'm testing with a random file (such as a JSON) from this link, but it just seems to pull an empty file which can't be read.

Images: image image

This doesn't actually look like much of an issue with the Panel, moreso Wings, as the Panel runs through the pull function correctly and also logs it in the Activity logs section.

I haven't checked to see if this feature is even present in Wings yet, but if isn't, apologies!

Let me know if you need any more information or if you'd like me to test this further 👍🏼

camwhi-te avatar Jul 05 '22 22:07 camwhi-te

#WorksOnMyMachine strikes again. Anyways, can you check your wings logs for errors? image

Boy132 avatar Jul 06 '22 06:07 Boy132

Ah, identified the issue. The file does pull correctly, but requires a page refresh in order to view the file and see the correct file size. What would be the best way to approach a page refresh?

camwhi-te avatar Jul 06 '22 13:07 camwhi-te

Like this, hope it will be merged

anondev-sudo avatar Jul 11 '22 06:07 anondev-sudo

I'm having the same issue with pull files- it seems to download it, but the filesize is 0 bytes- and on refresh it disappears. Wings diagnostics:

INFO: [Sep  8 17:48:15.548] starting pull of remote file to disk download_id=da237ec9-a801-436b-a4e9-fdd8d152994f server=dd6029a7-f642-4909-b989-addd217d77a2 url=https://github.com/ViaVersion/ViaVersion/releases/download/4.4.2/ViaVersion-4.4.2.jar
ERROR: [Sep  8 17:48:15.754] failed to pull remote file download_id=da237ec9-a801-436b-a4e9-fdd8d152994f error=downloader: got bad response status from endpoint: 302 Found server=dd6029a7-f642-4909-b989-addd217d77a2

TheRealGramdalf avatar Sep 09 '22 00:09 TheRealGramdalf

I'm having the same issue with pull files- it seems to download it, but the filesize is 0 bytes- and on refresh it disappears. Wings diagnostics:

INFO: [Sep  8 17:48:15.548] starting pull of remote file to disk download_id=da237ec9-a801-436b-a4e9-fdd8d152994f server=dd6029a7-f642-4909-b989-addd217d77a2 url=https://github.com/ViaVersion/ViaVersion/releases/download/4.4.2/ViaVersion-4.4.2.jar
ERROR: [Sep  8 17:48:15.754] failed to pull remote file download_id=da237ec9-a801-436b-a4e9-fdd8d152994f error=downloader: got bad response status from endpoint: 302 Found server=dd6029a7-f642-4909-b989-addd217d77a2

Thats not the same issue as cmrxnn's. In your case wings fails to pull the github url.

Boy132 avatar Sep 09 '22 06:09 Boy132

Can this be also added to eggs that you can pull egg json file from link to import it on pterodactyl without downloading the json file and then uploading it to panel?

anondev-sudo avatar Sep 09 '22 12:09 anondev-sudo

Can this be also added to eggs that you can pull egg json file from link to import it on pterodactyl without downloading the json file and then uploading it to panel?

That has nothing to do with this PR?

Boy132 avatar Sep 09 '22 13:09 Boy132

A way to name the file without depending on the url would also be nice for urls like https://api.purpurmc.org/v2/purpur/1.19.2/latest/download which don't have the file name at the end of them

saboooor avatar Oct 06 '22 07:10 saboooor

Hey, I'm just gonna close this as I plan to re-build the way the modal works entirely. Specifically around the way it figures out file names. Internally on Wings we have options to support using the Content-Disposition header and also to override the name entirely, but I'd like this functionality to also happen in the front-end where we pre-fetch the file and allow the user to override the name, and optionally add stuff like checksum verification. Due to the complexity of these changes, I'll just implement it when I get some time.

Thanks for keeping this PR updated though!

matthewpi avatar Oct 16 '22 23:10 matthewpi