How do I make uploaded content uploaded from many servers - file

I have this kind of problem. I have created a web application and I am going to run it on a dedicated server. Users will be able to upload photos and other kind of files. If the users increase I add another server.
So they become two like in the picture below. Now since the files are being uploaded to my applications root folder, I think the new server won't be able to read those files. How can I accomplish to store files in a way that whatever server a user will be connecting to he will be able to retrieve the file. How are the cheaper computers (small ones in the ring) connected so that they store files like one big drive with one giant folder such that whenever I want to increase storage I just add another cheap computer to the ring. What do I need to search for in the web?
please pardon me for my poor English. I had asked a similar question before but nobody answered so I thought the photo might help. I am willing to learn anything new to solve this problem. my other earlier question

Related

Best way to transfer database to new website without access to previous one

I has old website, which I miss dashbored login info, so I didn't has access to its database
Now I implement new one, what the best way to extract previous data (mp3 files, articals, mp4 files) to use it in new one.
I hope there is a way to extract its not manually
Thanks
I'd suggest in future all extraneous matter, images, mp3s etc. be held in a separate folder on your server, and hyperlinked to where they appear on a page.
That folder can be downloaded for safe-keeping.
.
In this case, I can only suggest that if the website is still up ( since you've simply lost the keys ), as an ordinary user you could download the whole website [ which wouldn't include the database ] with something like wget or Httrack to your computer, and from that extract what items are possible to your computer [ filtering by extensions if need be ].
At the very least you should get an idea of which items were present, even if they don't download.
As for articles, either the website online, or the downloaded website should display them in a browser, and you could copy the text.
None of this applies if the website is no longer online; but I wish you well whatever the outcome.

"Respawning" Files in Cpanel

So straight to the point- Im trying to clean my host entirely (databases too) and after I delete the last 2 files wp-content and wp-includes (700MB of files) they get restored instantly. This may be a simple question but for me it s very odd and I don`t get it. Besides file-manager i used Filezilla too and the same thing happens(my hosting company as it su#%$ failed to give me a reply after 48h).
I have recorded a short video of my problem to help you better understand my issue.
https://www.youtube.com/watch?v=wqL35R0-vvw&feature=youtu.be
Hope you`ll be able to help me. Thank You !
I`m working on this website for an NGO after it was hacked and for now I want to wipe every single file from the server and rebuild it but those files which have inside infected pages(php scripts) wont get deleted
Chances are very good some of those files are owned by the webserver, especially if you were compromised via a WordPress vulnerability. As they're owned by the webserver and not your user, you're unable to delete them.
If you have root/sudo access, you can use that on the command-line to remove them. If you don't, you'll need your host to help.

Protecting the video files from access by third party apps from iOS sandbox

I have a requirement where my app records the video files and stores them in app's documents directory. I want no other app should access these files other that my app. I have set file sharing enabled to NO. But I see some apps like iExplorer can show the video files saved under my app's documents directory. Can I know how this can be avoided.
I have also heard that by mounting the iOS device disk to any unix/linux machine can list out all the contents of the app sandbox.
So I want to know how to prevent this happening.
I tried with adding NSFileProtectionComplete as a attribute when saving the file. But this didn't solve the problem. Please help me on this.
Thanks,
I realize this is a little old but in the hopes of helping the next person who stumbles upon this:
You're probably looking for an encryption solution, combined with the standard steps for hiding your app documents folder as you've mentioned. Encryption won't necessarily hide the files but it will make them unreadable.
NSFileProtectionComplete only encrypts files when the device is locked. See the App Programming Guide for iOS section Protecting Data Using On-Disk Encryption. Also, keep in mind that when testing this, you'll have to wait 10-20 seconds after the device is locked before trying to verify that the file is inaccessible. If you want the encryption to persist past that point you'll have to handle it yourself. Something along what's described in this SO post perhaps.

save image in database or in server directory [duplicate]

This question already has answers here:
Storing Images in DB - Yea or Nay?
(56 answers)
Closed 6 years ago.
I use java, tomcat, jsf and primefaces
and I have a field "image" in my product table and I 'd like to ask you which is better : save the image in the database or in one directory in the server
if the second case is the best, please explain me more how to manage it (I never had the opportunity to meet this case)
thank you in advance
Whether or not you want to save the image binary in database or save the image file in server directory depends on your need.
The never ending debate is still going on and you can find it easily with several key strokes.
Here is how I do it(second approach) and it never disappoints me:
Assuming you are building an e-commerce website and want to host seller uploaded images such as product images and show them later.
Save the uploaded image files physically on your server outside of your war .Let's say the directory is /baseFolder/ and the full path of the file is /baseFolder/path/to/image.jpg.
Add a virtual host in Tomcat so that your http://localhost:8080/imageBase/ is pointing to the physical directory /baseFolder/. There are many other ways to make this kinds of mappings.
Store the relative path /path/to/image.jpg in your database. So that when you want to show it you can simply say:<img src="#{webappRoot}/baseFolder/#{pathRetrievedFromDatabase}"/>. In this case it would be <img src="#{webappRoot}/baseFolder/path/to/image.jpg"/>
There are of course a lot of different ways to achieve the same thing.
This is the simplest way I can think of to explain how it is managed.
Hope it helps.

Storing Serialized Video files to SQL Server

I currently am faced with a need to host 20 small video files for my website. I know I could just host them with my project in a folder but I came a crossed this article.
http://www.kindblad.com/2008/04/how-to-store-files-in-ms-sql-server.html
The thought of storing the file in the db had not occurred to me. My question is would there be a performance increase or decrease by storing the files as bit data in the db versus just streaming the data. I like the idea of having the data in the db for portability and having control and who gets access to the videos. Thanks in advance.
Unless you have a pressing need to store them in a database, I wouldn't, personally. You can still control who gets access to which files by using a handler to validate access to the file. One big problem that the method in that article has is that it doesn't support reading a byte range - so if someone wants to seek to the middle of a video, for example, they would have to wait for the whole thing to download. You'd want it to be able to support the range header, as described in this question.

Resources