Rocket.chat File Upload - linux

File upload does not work with GridFS in CentOS; file uploads get stuck at 0%.
I changed it to FileSystem and now it works after restarting the service.
Where exactly do the files reside once uploaded?
Side question: anyone know why GridFS does not work?

I had this problem as well. GridFS worked for a few days then stopped. It turns out GridFS is using a subdirectory in /var/tmp which was getting automatically deleted. If you switch to FileSystem you can manually specify the upload location in the server admin configuration.

Related

how to save uploaded file on elastic beanstalk?

I use a elastic-beanstalk service on AWS by using Node.js.
I use a multer for file upload and uploaded file is saved on webserver.
But when I publish a new version of project file, the files that saved on my webserver are gone.
I want to maintain the file on webserver.
just overwrite not rewrite.
so how can I solve this issue?
Thanks for your time!
When working with Elastic Beanstalk (or any auto-scaling environment), ideally you don't want to store anything on the server itself. If a user is uploading a file, save it somewhere off the server.
In AWS, this typically means storing it in S3 - this means that the file doesn't get lost when the project is updated or the server gets terminated.

Uploaded Image Disappeard When Heroku Server Restart

I am using node.js to upload files to my Heroku server. Everything works fine, but when the Heroku server restarts or goes down all the uploaded files disappears, the URL hits returns 'Not Found'.
Experienced this months ago. You need to host the images somewhere else as Heroku does not support storing files in them. Ended up using Cloudinary to store files, and then later on getting a VPS server.
Media files and other user content that is uploaded by users should not be stored on Heroku. Heroku was built to run the application code and it only cares about the files of your application that are in your repository.
Heroku discards your previous environment on every deploy, and launches a new one based on your code repository.
So only application code should stay there, other things should be delegated to other services, in this case for file storage you should use something like S3 or similar.
Heroku has something called Ephemeral filesystem.
From the documentation:
Each dyno gets its own ephemeral filesystem, with a fresh copy of the
most recently deployed code. During the dyno’s lifetime its running
processes can use the filesystem as a temporary scratchpad, but no
files that are written are visible to processes in any other dyno and
any files written will be discarded the moment the dyno is stopped or
restarted.

Possible to set local folder for automatic file uploads

Bit of a loose question so if it gets marked down I'll remove it.. but..
I'm using Primefaces/Spring/Hibernate for Java server.
My application knows a load of file names I need to upload. Those files are on my local computer. Is it possible to tell the application the root directory of these files, for it to then setup uploads for each of these files without me needing to browse for each file individually?
I assume this is a browser security issue, i.e. the user needs to explicitly state which file the application is allowed to know about etc?
If not I'll have to do it in a local application but I was hoping there was a way a mass upload could be kicked off from the browser by just setting the local directory of the files.
I decided to use the Primefaces uploader, upload all the files in the directory and let the application sort them out once it has them on the server.

How to develop a real time file upload with Angular 2 and Node.js?

Usually, while we upload it takes files to the temp directory first and then move it to the desired directory. But I'm working on Big Data e.g. uploading thousands of files at once. So I need to upload those files directly to the desired location and as each one of them uploaded to that directory, the user must see the changes on the dashboard in real time.
Also I need to show user
If any exception has occurred while uploading e.g. if a file causing a problem in the uploading process.
There should be an option to skip that file or retry upload.
Report to show the list of files uploaded successfully vs files that failed to upload.
If there is any network outage, the upload manager should keep retrying until the network is restored.
User can pause upload and can restart it on next login(if it is feasible)
This is about full manipulation of the upload process to give user the best user experience while uploading large sets of data.
You can use ng2-file-upload, it has most of the feature you require.
You can also find demo here.
For rest of the features you require, you can implement those on top of this library (It's better than writing your own code from scratch).

Uploading my database.sql file to Linux server using WinSCP

I am having some bad issues on uploading a dumped database file from my local computer to server using WinSCP. On my local computer it is abc.sql and when it is uploaded it shows me abc.sql.filepart. What does it mean?
Thanks in advance for the responses.
Your upload is not finished or was aborted. Many client use this suffix as a temporary file during a running upload.

Resources