panel
panel copied to clipboard
Pull remote files button (v2 backport)
A backport of v2's pull remote file button. (https://github.com/pterodactyl/panel/commit/3c2a6e11360001cbc33d170af2fa6cabe7866481)
Updated to the new dialog/ button styling.

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:

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 👍🏼
#WorksOnMyMachine strikes again. Anyways, can you check your wings logs for errors?

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?
Like this, hope it will be merged
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
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.
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?
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?
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
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!