Error uploading files

LumiBeads

New Member
Messages
1
Reaction score
0
Points
1
Hello, I can't upload files, I get the next error when uploading with ftp

Command: STOR wp_config.php
Response: 150 Accepted data connection
Response: 451-Error during write to file
Response: 451 Transfer aborted

I checked file permissions, it's ok,
Also tried uploading my file with File Manager from the control panel and I got:
2024-11-27 00:36:44.886060 [INFO] [209342] [T0] [127.0.0.1:37718#APVH_www.lumibeads.site:443] Abort request processing by PID:209996, kill: 1, begin time: 6, sent time: 6, req processed: 0
2024-11-27 01:08:00.013629 [INFO] [358635] [T0] [111.7.100.23:46836#APVH_www.lumibeads.site:443] Abort request processing by PID:360600, kill: 1, begin time: 2, sent time: 2, req processed: 0

currently my site is not working because the file was not uploaded but the content was deleted...
Thanks in advance for any help
 

fusio

Member
Messages
64
Reaction score
5
Points
8
You could upload it from your own application.
I give you the steps (these files that you are going to create in the root of your application must be removed and added only when you go to upload the files)
1. you create a file where you will have a post method form with the action="upload_files.php" and with the enctype="multipart/form-data" attribute;
2. you create the file upload_files.php and put the following in it:
Code:
//process file
    $file = $_FILES['file']['name'];//where file is the name you gave to the file input of the form in step 1.
    $destination_file = $_SERVER['DOCUMENT_ROOT'] . '/folder_you_want/';
    move_uploaded_file($_FILES['file']['tmp_name'], $destination_file . $file);
    //end process image
    header("Location:../form_file_you_created.php");
    exit();
Keep in mind the size of the things you upload.
In case you want to upload images, I can show you a piece of code that automatically converts the images you upload into webp format.
 
Last edited:
Top