Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid local uploads path #1

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Conversation

akcyp
Copy link
Owner

@akcyp akcyp commented Jul 7, 2020

File upload provider does not consider the strapi configuration. This patch should fix the problem.

Description of what you did:

const path = require('path');
const strapiDir = path.join(__dirname, './backend');

const Strapi = require(path.join(strapiDir, `/node_modules/strapi`));
const strapi = Strapi({
  dir: strapiDir
});
strapi.start();

This configuration generates the following error when uploading the image:

ENOENT: no such file or directory, open 'C:\Users\XYZ\Desktop\backend\public\uploads\screenshot_862571e640.jpeg'

The correct directory should be:

C:\Users\XYZ\Desktop\app\backend\public\uploads\screenshot_862571e640.jpeg

File upload provider does not consider the strapi configuration. This patch should fix the problem.
@akcyp akcyp added the bug Something isn't working label Jul 7, 2020
@akcyp akcyp merged commit 26792aa into master Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant