Document library – online user can upload files with anonymous share link

I face this problem in my SharePoint Online.

I shared a folder with an anonymous link where I disabled editing. In this scenario, I don't want to allow anonymous users to upload files or create folders.

When trying to use the anonymous link, I found that I can upload new files or create folders. Right, I cannot delete files or folders that I have created.

Is it possible to prevent uploading files or creating folders by guests / anonymous users?

Authentication – Upload the file to Sharepoint without saving your username / password

We want to upload files as part of CI / CD in Github (Actions) to SharePoint.
I figured out how to do this with REST API, but that requires username / password. Owner tokens also work, but we need a separate call to get them, which in turn requires username / password

Is it possible to get a kind of permanent token (I have already created an access token for apps only) and to use it directly in the REST call?

Basically, the question arises: How can I upload a file to Sharepoint using HTTP calls and without a username / password?

Upload image to PHP server and Ajax

Hello, I am stuck in an application that I am currently making.
I have this code to upload an image to a folder on my server, but when I give it for upload, the image will not be uploaded. Does the warning only give me some advice? Some advice or help that could help me correct my code. I want to implement a record on my page, but I want to upload the image to the form

** INDEX *
















Upload a photo
<

In this part I have the PHP that receives the data to be able to save it

 0) {
    if (($_FILES("file")("type") == "image/pjpeg")
        || ($_FILES("file")("type") == "image/jpeg")
        || ($_FILES("file")("type") == "image/png")
        || ($_FILES("file")("type") == "image/gif")) {
        if (move_uploaded_file($_FILES("file")("tmp_name"), "images/".$_FILES('file')('name'))) {
            //more code here...
            echo "images/".$_FILES('file')('name');
        } else {
            echo 0;
        }
    } else {
        echo 0;
    }
} else {
    echo 0;
}

It would be very helpful if you could advise me on this