How to programmatically overwrite server files?

hi!
I just migrated to render because of Glitch going down and one part of my workflow is not working correctly and I’m a noob please help!

So first i do all my coding on my coding phone then have a button that combines all the pages and i send it over bluetooth to my internet phone.

So on glitch i had a fileupload in html on a page and would then upload the file.

The server would receive it, unpack it back in to a bunch of different files (really strings at this point), and fs.writefile each of them to overwrite the previous files that made up the server.

then i would go back to my site and it would be all updated.


so i have a github now since render needs it tho im a noob at it. teh project from glitch moved successfully to github. and it seems to deploy correctly and i can get to my edit page and upload my file and it even says ‘file uploaded’. but then nothing changes. i also look at the pages on github and none of them have changed.

Please help!
with render does fs.writefile not write file?
is there a setting somewhere im missing?
alternatives?
thank you!

به نظر می‌رسد که مشکل مربوط به مجوزهای نوشتن روی فایل‌ها در محیط رندرینگ باشد. برخی از سرویس‌های هاستینگ، مانند Render، مجوز نوشتن مستقیم روی سیستم فایل را محدود می‌کنند و تغییرات ایجاد شده فقط در حافظه موقت باقی می‌مانند.

برای حل این بررسی کنید:

  1. بررسی مجوزها: مطمئن شوید که مسیرهایی که قصد نوشتن در آنها را دارید، دارای دسترسی مناسب هستند. در برخی از سرویس‌ها، فقط دایرکتوری‌های خاصی اجازه تغییر دارند.

  2. استفاده از پایگاه داده یا فضای ذخیره‌سازی ابری: به جای نوشتن مستقیم روی فایل‌ها، می‌توانید داده‌های خود را در پایگاه داده یا یک سرویس ذخیره‌سازی مانند AWS S3 یا Firebase قرار دهید و هنگام بارگذاری محتوا، فایل‌ها را از آنجا بخوانید.

  3. بررسی تنظیمات گیت‌هاب و رندر: فایل‌هایی که مستقیماً از طریق گیت‌هاب مستقر می‌شوند، ممکن است در محیط اجرای برنامه به‌روزرسانی نشوند. بررسی کنید که آیا تغییرات به درستی در گیت‌هاب اعمال شده‌اند و سرویس رندر، آخرین نسخه را دریافت کرده است یا نه.

  4. استفاده از داینامیک فایل‌های موقت: برخی از هاستینگ‌ها فایل‌هایی را که در هنگام اجرا تغییر می‌دهید ذخیره نمی‌کنند، مگر اینکه از دیتابیس یا APIهای خارجی استفاده کنید. بررسی کنید که فایل‌ها در هنگام اجرا به‌درستی بازیابی و نمایش داده می‌شوند.

  5. بررسی خطاها: مطمئن شوید که fs.writeFile خطایی را در حین اجرای کد ثبت نمی‌کند. می‌توانید پیام‌های خطا را در لاگ بررسی کنید.

اگر باز هم مشکل دارید، می‌تواید یکرا ارس

تا دقیق‌تر بر

در تاریخ جمعه ۳۰ مهٔ ۲۰۲۵،‏ ۸:۲۹ ب.ظ allo via Render <notifications@render.discoursemail.com> نوشت: