I am using this post as a reference for what I want to do. I am trying to add a button on my web app that allows the user to click a button upload an excel document straight to a database. In the example I am referencing they use the FileUpload class but It appears I do not know how to use this in a web app.
I attempted putting it in a service file:
FileUpload fileUpload1 = new FileUpload();
but I cannot reference the fileUpload1 variable in that context. My best guess at this point is that this is a web app and I am trying to use a windows form class. I get a reference to System.Web.UI.WebControls; when I use it though.
Any suggestions?
Related
I would like to know if there is any tool or configuration to block the access from the url to use it only inside a web view in my application (Android/iOS). The web view is using React JS.
I would like to crate a really simple react app where a registered and logged in user can create a post with an featured image and some custom fields (acf fields).
I wonder whats the best way build and include that in a static Wordpress Page?
I need to make a "gallery" like Google Photos for a class project. My idea consists in a web app that allows a user to upload a file (image) and save it to a db and after that to show it in the web app. I just want to know how should the structure of my collection be if that collection saves a file (<16MB I read for >16MB we have to use gridfs).
For the back-end, I will use Node (with Express, Mongoose ... and so on) and for the front-end I will use react or vue.js. I am not sure yet.
Any suggestion is accepted.
You can do the following two things.
Upload image to s3 and save its link in the mongoDB. More Read(https://medium.com/#fabianopb/upload-files-with-node-and-react-to-aws-s3-in-3-steps-fdaa8581f2bd).
Save image in database in a GridFS collection. More Read
(https://docs.mongodb.com/manual/core/gridfs/#when-to-use-gridfs)
I have a asp.net core web application. My application has some reactjs components, that runs client side.
In my asp.net core views, i use IViewLocalizer to localize my pages and it works just fine.
I have found some projects like react-localization to handle this on reactjs. To use it, I need to do one of the following:
In my view create an object with my resources and give it to react-localization
Create an endpoint that return my resources, call it inside reactjs component and give it to react-localization
My question is, what is the best approach to bring localization to reactjs components?
When i posted this question, i had a simple react application with less than ten resources.
I chose the number one option, in my view create an object with my resources and give it to react because it is a more simple solution.
On another big react project, i chose the number two option: create an endpoint that return my resources and call it inside reactjs. It is a bit more complex, but all logic is inside reactjs and the html does not have a giant script object with all resources.
I've angular app with lots of states and modules etc. Now, I want to send a link to the user. When user'll hit this url, I want to redirect him to a new tab rendering only that particular state (specified in URL) i-e I don't want anything else to be visible to the user. Or you can say, I want to open a popup window rendering that particular state's html in popup window . This is the approach that comes to my mind to sort it out.
Ps. There are Rest APIs at the backend which I am calling through angular resource service to bind data with the model of the views
Option
I've rest APIs on backend, So, I was thinking to developing s separate Nodejs application, And I will send nodejs application url to the user and in the default/home route I'll call backend API and, the returned resultset will be rendered in html file within nodeJs application and this way, I'll render the corresponding data to user's browser window.
This is the flow for that
I don't know if that is right or clever approach. Please suggest me what will be the best approach to sort it out.
Thanks in advance.
This is what my app looks like
Everything in the left side-nav is a module and clicking on this I am routing to a different state. I am using angular-material and lots of other dependencies in this project.
And this is what I want.
I'll refer a link to the user for example www.myapp.com/specificpage.html. And hitting this url, a new tab/popup will be opened rendering state defined in the same app but with some non-editable url. And it should like.
There are multiple ways to achieve this and each approach has advantage and disadvantage. You have to choose depending on requirement and architecture. Details are below-
Create a separate app - You can do it through separate code base or use the module based build process and include this module only for new app.
Divide application is two part, public pages and private pages - Include this page and required APIs for this page in the public modules for your app.
Send token in the link - If you want to make secure page, send short lived token in the eMail and validate token on the server before displaying page to the user.