- Notifications
You must be signed in to change notification settings - Fork1.6k
Create Mcpe generator#2644
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Mcpe generator for Minecraft PE
@KomkaGames is attempting to deploy a commit to theOnlook Team onVercel. A member of the Team first needs toauthorize it. |
const User = mongoose.model('User', userSchema); | ||
// Налаштування AWS S3 | ||
const s3 = new AWS.S3({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Avoid using hardcoded AWS credentials; rely solely on environment variables to manage sensitive data.
}, { | ||
headers: { Authorization: `Bearer your_huggingface_api_key` }, | ||
}); | ||
const fileBuffer = textureResponse.data; // Припускаємо, що це бінарний файл |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The current code assumestextureResponse.data
contains binary file data, but the Hugging Face API typically returns JSON responses. To properly handle this, extract the actual image data from the response. For example:
constfileBuffer=Buffer.from(textureResponse.data.image,'base64');
This converts the base64-encoded image data from the JSON response into a proper binary buffer that can be uploaded to S3. The exact property name (image
) may vary depending on the specific Hugging Face endpoint being used.
const fileBuffer = textureResponse.data; // Припускаємо, що це бінарний файл | |
const fileBuffer =Buffer.from(textureResponse.data.image, 'base64'); |
Spotted byDiamond
Is this helpful? React 👍 or 👎 to let us know.
if (firebaseUser) { | ||
setUser(firebaseUser); | ||
// Встановлення плану "Про" для вашого email | ||
await axios.post('http://localhost:3000/api/set-plan', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The hardcoded URLhttp://localhost:3000/api/set-plan
won't work in production environments. Consider using relative URLs (like/api/set-plan
) or implementing a configurable base URL that can be set according to the environment. This approach ensures the application works correctly across development, staging, and production environments.
await axios.post('http://localhost:3000/api/set-plan', { | |
await axios.post('/api/set-plan', { |
Spotted byDiamond
Is this helpful? React 👍 or 👎 to let us know.
Uh oh!
There was an error while loading.Please reload this page.
Mcpe generator for Minecraft PE
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Introduces a Minecraft PE texture generator with Node.js backend and React frontend, including user authentication, texture generation, and history tracking.
server.js
with Node.js and Express for handling API requests./api/generate-texture
for texture generation with resolution checks./api/set-plan
,/api/history/:userId
, and/api/set-language
for user management.src/App.js
for React UI with Firebase authentication.i18n.js
for localization.cypress/integration/app.spec.js
for login, language change, texture creation, and history display.package.json
with necessary dependencies for backend and frontend.This description was created by
fora6a364d. You cancustomize this summary. It will automatically update as commits are pushed.