uSked / mosaico-php-backend

A PHP backend for Mosaico
GNU General Public License v3.0
32 stars 34 forks source link

SOLVED: Image upload #23

Open gazzerman opened 7 years ago

gazzerman commented 7 years ago

OK after wanting to throw my machine out the window I finally solved the issue everyone seems to have on here.

Its a messed up way to solve the issue but it works and maybe someone else can write some new code to make it neat again.

I uploaded the editor.html to the root directory, which overwrites the old one (make sure the fileuploadConfig is set to the correct directory)

Then I created /backend-php/ and uploaded just these 3 files, config.php, index.php and premailer.php

Then I created three directories in the root (permissions 0777) /dl/ /img/ /upload/

Then I created a .htaccess file

RewriteEngine On RewriteRule (.*) /mosaico-master/backend-php/index.php [QSA,L]

And here is the bad coded bit, I uploaded .htaccess in each of those three directories I created (dl,img/upload).

Then it all worked.

So basically something is going wrong with the .htaccess file

Hope that saves someone else here the 6 hrs it took me to figure it out, lol

perlpty commented 7 years ago

excellent solution!!! It worked for me.