Server data transfer from static folder to client - express

I have a server with a static folder that contains some images for the public to preview.
I use Nodejs Express to serve the static folder.
I have 1TB data transfer each month.
Let's say an image is 1MB in size.
So, if a user used an image's link to view it does my server upload the image to the user? and 1MB is consumed from the 1TB?
Or the user who has to download it?
For example, opening google images and a bunch of images is loaded on your screen, does google upload all these images?
I need some explanations, thank you in advance :)

Related

Storing multiple Image in the directory and database

I'm making a small ecommerce project using Reactjs and SQL. I'm storing two different images shop(1) and user report(2)
I'm wondering if it's a good idea if I store the shop images in the directory itself like this
./public
./images
./shop
image1.png
image2.png
index.html
While the user report gets uploaded in the SQL as a blob
If the shop images are only used as static resources for your app, your example is the common way to do it.
However, if the shop images can be added/edited by users or if they shouldn't be visible to everyone, then you should store them in the database similar to the user report images.

Is there a way to edit the size of on image on Cloudinary without changing the url?

I am optimizing a small website with images hosted on Cloudinary.
I would like to reduce all the file sizes of the images in one go without editing the URLs on the website.
Can this be done?
You'll have to reupload the images while performing incoming transformations, where the transformations are applied upon upload rather than on the fly.

How to upload Images to online web server using VB.NET using desktop application

I am developing a desktop application (network-aware) that work with network to collect and store the users' personal information, including passports and signatures of the users.
I initially store the images in database by converting them to bytes and store them in longblub data-type. Later after realizing that my database is getting to heavy decided to convert all the images back to normal .jpg file and upload them to web server.
Now as all the images are manually uploaded, i want make sure all the images of new users will be uploaded when save-button is click on the desktop application
Thank you.
If you have the permission to create a shared folder on webserver \\servername\sharefolder$.
Use File Open Dialog Control, after button click, you can direct save file into the shared folder
string fulllocimage = openFileDialog1.FileName;
File.Copy(fulllocimage, Path.Combine(#"\\servername\sharefolder$",Path.GetFileName(fulllocimage));

Backup Isolated Storage as whole and recover

I am developing a Windows Phone 7.1 application. The app serializes objects to JSON and saves them to the IsolatedStorageSettings file.
The objects also have images that the user may capture with a camera. These images are saved to Isolated Storage as a jpeg file with the "Extensions.SaveJpeg" method. Images are referenced by a unique ID from the object JSON so they can be loaded from the storage with the object itself or loaded only when needed.
Now that I have this up and running, I would like to create a backup to SkyDrive functionality with recovery.
What I want to ask is how can I simply backup the Isolated Storage as whole, and recover as whole?
I've been thinking if there is a way to (1) generate a zip file containing the whole Isolated Storage, (2) upload that to SkyDrive, (3) downloading from SkyDrive and (4) unzipping it replacing any existing files in the storage.
The steps (2) and (3) I know how to do (instructions found easily by google). I can also do step (1) but with many lines of code. I am seeking for a simple solution to zip the whole storage and recover from it.
I recommend you to use Perst as the local database solution for your windows phone application.It can be imported or exported as xml which you can upload/download to/from SkyDrive or other cloud system.
Home page of Perst:http://www.mcobject.com/perst/

Serving images from Amazon S3 in PHP application

So it just occurred to me that once I upload profile pics to S3, I have to figure out a way to keep track of the files. For example, if "susan" uploads 3 profile pics, I need to recall those 3 pictures and display it on her profile page if someone views her page. With that said, would the following work?
User uploads picture from form
Save file information (filename, user info, etc...) into DB and reference URL from S3
Upload photos to S3
When displaying pictures, I'll query the DB for the info and display the images from S3 accordingly.
You should not store the full URLs in the database, just the file names. The URLs will all be consistent with this pattern:
http://s3.amazonaws.com/YOUR-BUCKET-NAME/YOUR-FILE-NAME
So you just need your constant bucket name and file name.
This way you can change how you serve the files and only change your app, not the data in the database (for example, if you start using CloudFront instead of direct S3 access).
ended up using GridFS from MongoDB.