Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I want to send a dynamically created workbook via a POST request. In case when I have a file, it is easy to do. Is it possible to avoid the part of saving it into the file? Thanks!
To answer the actual question: This is not possible.
Because you can only send via POST what exists. If you want to send a file, that file needs to exist. If you don't save that file it doesn't exist yet.
So you need at least save it in the temp folder and delete it after sending.
Depending on if you are in control of the server API you can ask for a JSON with the data only, so you can submit the data without the huge overhead of an Excel file. If you are not in control over the server API and Excel files is the only that the API accepts, then your only option is to save the file temporarily.
Related
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 2 years ago.
Improve this question
Good morning and thank you in advance.
I put you in situation... I'm designing my first "professional" website and it have a form with personal data and the user have to attach confidential private document. When sending it, the app generates a PDF that is sent to the user to serve as proof of having made the request correctly and sends to my client that PDF and the documents attach in the form. You can not give the situation that you send an email but not the second, so, Would there be any way to verify that both emails will be sent correctly and that only in that situation will the be sent?
I'm using node.js on the server side and nodemailer to send the data.
Thanks
PD: Excuse my level of English.
Systems can fail due to any reasons, we must have backup plans, it depends on your use case how you handle the backup plans.
One approach to your problem statement can be you can have some key in Redis (or any cache database) to check if both emails are sent, if not you can retry sending the pending email.
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 2 years ago.
Improve this question
We have a web platform that allows users to upload and download their data stored in a storage connected to Linux via NFS.
currently about 350GB data is stored.
I want to show each user their current storage usage on the web in real time like Google drive or Dropbox when you update a file, the remaining disk space is shown right away.
My idea was to run du command on Linux and send an update query to DB but du takes so long.
Is there any better idea that I can do this on real time?
Thanks
Given that users are only allowed to upload or download data, the sizes of files stored will not change while on your storage server since "Edits" are not possible.
If you store the name and location of the file upon insert into a database, it would be wise to include the size of the file uploaded too.
In php, you can do this with filesize().
This way, if you need to fetch the size of all the users files, all you need to do is grab all records owned by them, and add the file size column. This would give you a precise size of the users files, even if the files are located across different servers.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
I have requirement to unzip a file automatically whenever it is pasted in specified folder in onedrive (ex: zipfolder). So i basically want to know that, is it possible to run any program in onedrive that can fulfill my requirement.
If you were really dedicated to the task, what you could do is set up a web service with a webhook attached to the folder that you are wanting to do this in. When the webhook fires, your service can connect to OneDrive, download the file, unzip, and re-upload the contents.
It may not be possible to run a program from onedrive...One drive is a cloud based server or rather storage,You may be forced to download it and install it from your hard disk
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 8 years ago.
Improve this question
I have a business idea where clients would enter some information in on a Software as a service type interface by filling out some web forms. The information they entered in would then be saved to my database. I am comfortable with this part, however I would like to be able to have clients put a small almost stupidly simple code snippet on their web page and be able to push content to their web page in a content div. I guess I could just send them a .php file to upload to their root and a single include line to write but I would prefer not to do this sort of thing since I don't really want to be mailing out proprietary code snippets with my DB information.
Are there any suggestions for how to implement the content push that are both extremely simple for clients to put on a web page but at the same time very private in the way the code is pushed?
I don't know if I understood your question really well but...
Isn't the answer to your problem a webservice? You could create a webservice that receives some sort of "password" and if the password is right you return the data JSON/XML formatted.
But you are talking about push, that means that when your server have new information you want to notify your client's server about the new information. I would say that what you should do in that case is make a request to the client server notifying them that you have "new stuff" and then after they have been notified they simply go ahead and use your webservice (mentioned above) and update their data.
I hope this answer your question or gives you and idea of how to do it.
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 9 years ago.
Improve this question
I'm creating a browser based image cloud service and every user will have his own picture folder.
My question is how to make sure, other users or hackers can not access foreign folders.
What is to consider?
Is it e.g. enough to check session-variables?
Thanks in advance!
I'm not 100% sure what you mean by just checking the session-variables.
I would create a setup like this:
\root
\userImages
\user1
\img1.png
\img2.png
\user2
\img1.png
\img2.png
\public
\index.php
I'm assuming you would use PHP or ASP.NET or something similar that uses some type of server like nginx or apahce. You can set the server root to the public folder. This means only your code would have access to the user images.
You can use PHP or whatever language to look at the session information and see if the user is authenticated. If you can, I would recommend encrypting the cookie data with Mycrypt. Once you have checked the authentication, you can get the file with a script and send back header information. Here's a really in depth article that I think would help you if you actually want a how-to. Protecting Images with PHP
If you are using PHP, Laravel handles sessions and protecing images really nicely.