MEANJS how to send csv to user - javascript

I'm using MEANJS to do a node app.
Basically I have JSON stored in Mongo that I am using json-csv(NPM module) to get out to csv. I was able to get it to download (via a button) locally by doing a couple of tricks. But, when I uploaded it to azure it pooped on me. I rolled back everything and now I don't have the code to post here... but, it didn't really work anyway since I need it to run in azure.
If anyone had some guidance or pointers I would really appreciate it.

You can store your csv in azure blob and provide users link to the blob.
BTW, you may still need authentication so a proper solution is providing users a link belonging to your sites and when users click the link, validate auth then redirect to azure blob links.

Related

How to create a login system that stores user data for beginners?

I'm working on my first web app using ReactJs and have the frontend pretty much done. Now I want to be able to pair the user's data with their username so next time they log in, everything will be exactly as they left it. The user's data is currently all in a JavaScript object so I think I want to save it as a json file. However, I have no clue how to even start this.
My first issue comes with creating the login system. Obviously I cannot just store the username and password in plain text so I would need to encrypt and decrypt it somehow. However, I am currently hosting my site on Netlify so I would need to pass that information over there somehow and the only way I can think of is by adding it to my GitHub repo which is public so anyone can then see my encryption algorithm.
I'm not even sure if this is even how you do it since I've never done anything like this before. Does anyone know where I should start? I don't need something super sophisticated just reasonable.
Probably you can use google's firebase and firestore services. They have an amazing documentation on their website too and there's plenty of resources online. google for firebase authentication tutorial and you'll find a whole lot.

SAPUI5 Odata Connection to Server

i have a question.. is there a way to get the odata data without a cloud connector? so basicly like http/https://serverip:port/sap/opu/odata/sap/... ?
If i try it trough the browser it works.. i get my metadata.
my manifest looks like this
i tryed it also with http.. but it wont work cause the origin request is a https (webide). The Console says..
i try it already with proxy/ before the ip but almost the same.. the errormessage go away except of one the [ODataMetadata] initial loading of metadata failed - . I even dont get the login popup like before over the cloud connector.. so is there a way to do it like this? that i can develope in the webide? in someday i want that the appilcation i a standalone app. And dont need the scp
thanks guys.
If you are using SAP Web IDE, the easiest way to do it, would be to add a Destination for your backend system in SAP Cloud Platform, and then add an OData service using that Destination in SAP Web IDE (this will create entries in manifest.json and create wiring to the destination in neo-app.json). As your particular endpoint works through your browser, you wouldn't need to use Cloud Connector.

Upload to S3 using javascript and phone verification

I have been through several of the amazon docs on this but I still can/t find a simple solution. I want to create a simple web page that allows users to upload images to my s3 bucket. Whenever I use an example I always get missing credentials as a response.
I also want to integrate a simple log on using the mobile phone with amazon's cognito. It is a single page application with no server back end. Happy to use Angular1 in the page.
I have the aws account set up but I am stuggling to find a simple example of how to do this. Does anyone have an example of how I might do this or where a tutorial that explains this very simply might be?

Upload blob to dropbox from client-side javascript

I have an app that runs in the client browser and doesn't have any server side (http/js is served, but nothing posts to the server). the app is redeployed on many servers (iis, apache, nginx, sometimes localhost, sometimes on an intranet) and are served using http (not https). My app generates files such as zip files and pdf's in the clients browser as blobs BEFORE I want to save, so having them navigate away on the same page then back to the app defeats the purpose; and I can't post the generated data to dropbox anymore, since they have to start over... I want to be able to send these blobs directly to files in the end users dropbox (and later google drive).
https://www.dropbox.com/developers-v1/dropins/saver performs exactly as I would like. It pops up. It lets the user authenticate in the popup. It lets the user choose where they want to put my file. But I can't send it a data uri, or base64-encoded data, or a bytearray, or whatever. It only works with files previously saved somewhere accessible on the net. So it does not work for me.
https://www.newfangled.com/direct-javascript-dropbox-api-usage/ shows how I could embed the oauth data, which I don't have.
https://blogs.dropbox.com/developers/2013/12/writing-a-file-with-the-dropbox-javascript-sdk/ seems like it should work, except that it's trying to perform an oauth session and it uses the same window as my app (which is undesired).
My current tabs I'm looking at (includes entries from a few years ago, so things might have since changed). Some articles indicate that it isn't possible. Other articles incidate that it IS possible - i mean this particular comment https://github.com/dropbox/dropbox-js/issues/144# doesn't help me much. Neither does "I'll be sure to pass this along as feedback" - was it passed along? To whom?
https://github.com/dropbox/dropbox-js/issues/144
https://stackoverflow.com/questions/30094403/save-input-text-to-dropbox
https://blogs.dropbox.com/developers/2015/06/programmatically-saving-a-url-to-dropbox/
How can I upload files to dropbox using JavaScript?
upload file to dropBox using /files_put javascript
https://github.com/morrishopkins/DropBox-Uploader/blob/master/js/reader.js
https://www.dropbox.com/developers/saver
https://www.dropboxforum.com/hc/en-us/community/posts/202339309-Can-I-save-a-JSON-stream-object-to-Dropbox-file-with-Dropbox-Post-Rest-API-
https://github.com/smarx/othw
Can Dropbox Saver accept data from createObjectURL()?
It sounds like the code from https://blogs.dropbox.com/developers/2013/12/writing-a-file-with-the-dropbox-javascript-sdk/ works fine for you, but you want to do the auth in a separate browser window/tab.
If so, I'd suggest just changing that code to use the Popup auth driver instead.

How can I upload a file to dropbox via javascript?

I am trying to allow users to upload large files without tying up my servers for an extended amount of time. I thought using dropbox as file storage might be a good solution. My plan is to use javascript to have the client-side connect directly to dropbox, so that my server is not affected.
I have been trying to find a current javascript dropbox api, but have not had much success. I tried using dropbox-js, but it seems that it is using an outdated version of the API as I get the following error with my current test: {"error": "You're using an older version of the Dropbox API with a new API key. Please use the latest version."}
Does anyone know a fairly simple way to accomplish this task?
Set up your application as a Folder app. If things go wrong, at least you won't blow up people's Dropboxes.
Follow these directions for obfuscating your API key and secret.
Use writeFile to upload the files, and then use makeUrl with the downloadHack: true option, then send the URL to your server.
You'll need the git version of dropbox-js to use downloadHack until the 0.7.0 release comes out.

Categories

Resources