File upload error on shared hosting

Hi!
I’m using RadSystems 7.1.2, and it’s working very fine!

But when i publish my app to my shared hosting (and make the laravel modifications), all the file uploads fields doesn’t work, like these:

image

Probably it’s a laravel config error… But someone has a solution?

@steffan this might be a denied permission error with you hoster maybe or misconfiguration of your project…are you usoling quasar or primevue?

1 Like

It might also be that the file path is pointing to a wrong path. Upload a new image through the live app and if it displays appropriately then the image link in the database is pointing to a different place.

1 Like

Yes willvin, you got it again haha!

The system dont find the files because its upload to a directory and make de link with other directory, see:


System gives this link when i upload


But it uploads to /public/{link}

Probably i need to configure something to work in shared hosting. Did u know what?

You need to make sure https://ctech.digital points directly to your project public folder.
So when I visit https://ctech.digital the content of the public folder should be loaded.

what I do in some cases where I want to use the main domain is:
rename the project public folder to public_html, and then move my project folder to one folder below in such a way the content on the renamed public folder stays on the web root (public_html). But if you are using subdomain it is easier since you can choose what folder you want the subdomain to point to.

1 Like

thank u soo much @willvin !! You rock!!!

Rename public to public_html folder works like a charm!

1 Like

@willvin i made what u say, but system keep uploading to public folder (instead public_html).

But i found a solution. If someone has the same problem, do the follow:

Edit your boostrap/app.php file

bellow the line 14-16

$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

add this code:

$app->bind('path.public', function() {
    return realpath(__DIR__.'/../public_html'); });

Now all uploads go to public_html folder

1 Like