Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Lets assume we have a web app which allows users to create and modify some dynamic structure (say, graph of some kind) and we don't want save changes permanently until the user clicks 'save' button. What is the best way to store and modify that dynamic structure?
Is it a good idea to use a plain JSON file on the front end, which we can modify according to user actions and then send to the server to update the database when user decides to save their structure? Or should we communicate with the server every time user makes some change, even if he can later decide to discard this change?
Is there a 'standard approach'?
You can use Locale Storage for this task. It's allow save data on client side.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 days ago.
Improve this question
Of course, I have read this question and know it is impossible in a simple way:
How to set a value to a file input in HTML?
However, I need it. For example, assume there is a User model that can have an attached file called avatar. Then, a user uploads their avatar image and tries to save what they typed in, but it has led to a validation error. Now, they expect the uploaded image to be there just like other text/number/date/etc. fields they filled. However, it is not done.
I could temporarily put the image into DB to show it again after the validation error, but do I really have to save it in DB? Is there any way that only uses browser and server RAM like a text field?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Welcome, all
I would like to create a small web application, which needs to scrape data from another website and save the results to a database.
So, currently, I have Laravel 8 installed on my local windows machine, and I made a connection to the database, where I have "items" in the table that I need to save the data in
And the data may be changed from another website so I need this change in the database as well,
and need to scrape many items from another website so I need to know id or something else to distinguish one item from another
Now, the question is, what is the best way to do this? I've tried some tutorials but I haven't.
You can use a package Goutte or domcrawler, first you need to do a request of a url for that you can use GuzzleHttp or get the portion of html content and filter it and then save all this data on a table of your database.
You can read more information about those libraries.
Another library that is more customizable is domcrawler Dom_Crawler,
Goutte
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to create an HTML form that submits a predetermined file upon the press of an input button. This file is not located on the machine running the html server, it is located on the end users machine. Idealy I would like a solution that is as light weight as possible.
As far as I know, it's not possible for a form to submit a local file without having the user select the file.
Browsers don't allow javascript (or other scripting technologies) to access the local file system, because it's a security risk.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm building an application with the instant messaging functionality.
The application will allow the users to send files/images as well as normal text messages.
I decided to take the approach with storing the files on the filesystem and write only the file paths to the database. There will be no updates to the files (only insertions and deletions).
Which database would be the best for storing a large amount of file paths, that would be easy to query for a certain user files?
I would go with MongoDB. My experience is that a document based approach using a single Messages collection would be best. Each message document then contains all of the file paths. This eliminates joins and better supports potential future functional requirements changes.
MongoDB also provides great ways to deal with old messages such as TTL indexes.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I have a MySQL db that is supposed to store shift details like start time, employee, breaks, nr. of items processed etc. to then analyze this data with MS PowerBI.
The employees are supposed to enter the data themselves after their shift and be separated from the data (not see or change it afterwards).
How should I set up the form the employees enter their data into? Should I make a website with a form on it or should I make a diy program that connects to the db?
I am quite new to all of this so I’m trying to find the best way to complete this.
Thank you very much in advance!
You already have a best guess. Yes, create a website which allows the employee to enter the details, grab the info with a back end application (php/java/kotlin/nodejs/python ... e.t.c), and do not develop a page that retrieve data to the website for the employees.
Afterwards, you can export your data to your desired application (you might need to develop something for smooth data transfer as well)