Comments (3)
Same here,
for me this is a rather big problem. I would appreciate a fix for this on CMS side.
Can the team acknowledge this and probably hint at how we can get this fixed?
from decap-cms.
also related to #7120
from decap-cms.
i ended up with a work around
exports.createResolvers = ({ createResolvers, pathPrefix }) => {
const resolvers = {
MemberSpotliteSectionJsonCompanies: {
companyImagePublicURL: {
type: "String",
resolve: async (source, args, context) => {
console.log("createResolvers", source);
const node = await context.nodeModel.findOne({
query: {
filter: {
base: { eq: source?.image },
},
},
type: "File",
});
console.log("createResolvers entries", node);
if (!node) return source.memberCompany.big_logo;
const { absolutePath } = node;
const { ext, name } = path.parse(absolutePath);
const filename = `${name}--${node.internal.contentDigest}${ext}`;
const newPath = path.join(publicStaticDir, filename);
try {
const exists = await fs.exists(newPath);
if (!exists) await fs.copy(absolutePath, newPath);
return `${pathPrefix}/static/${filename}`;
} catch (e) {
console.error(
`error copying file from ${absolutePath} to ${newPath}`,
e,
);
}
return source.memberCompany.big_logo;
},
},
},
};
createResolvers(resolvers);
};
from decap-cms.
Related Issues (20)
- Editor Does not respect Custom Mount Element
- Author-login empty on commit messages for Azure backend
- Couple Review Step in Editorial Workflow to Approval of PR in Version Control System
- test:all script is unavailable
- When install decap-cms-widget-markdown, it throw unmet peer error
- TypeError: Cannot read properties of undefined (reading 'path')
- RangeError: Invalid time value
- Deploying a template does not work
- UI Bug with Media Header Button
- Netlify Identity login dialog misbehaving - https://identity-js.netlify.com/v1/netlify-identity-widget.js not found HOT 1
- How to prevent users logged in with decap-cms from seeing the source code of the website? HOT 1
- datetime widget time picker does not accept any valid input
- local backend and auth HOT 3
- Error: Cannot get the start point in the node at path [7] because it has no start text node. HOT 2
- Error: Cannot resolve a DOM node from Slate node: {"text":""} HOT 2
- Only date('format') filter in Summary String Transformations work. All others are broken. HOT 1
- TypeError: marked is not a function HOT 1
- NotFoundError: The object can not be found here. (adding a nc-root div causes error)
- TypeError: Cannot read properties of null (reading 'href') HOT 1
- *long hot reload times*: Critical dependency: the request of a dependency is an expression, [webpack-dev-middleware] wait until bundle finished:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decap-cms.