Retrieving a json file stored in storage folder - laravel-5.3

How can I retrieve a json file which stored in a folder?. File path is: "storage/app/public/Upload"
I wrote something like this:
$Content=storage_path('app\public\Upload')::get('outstanding.json');
dd($Content);
but it is wrong.

Related

Download Onedrive shared file in R

I need to download an excel file shared in my company from onedrive, unfortunately I can't handle it. The link looks like this:
https://company.sharepoint.com/:x:/p/user_name/XXXXXXXXXXXXXXXXXX
After adding the parameter download=1 to the URL, the browser downloads automatically, but I can't write the R code that could download such a file.
I tried to download the file with this function
httr::GET(paste0(url), authenticate("username","password",type="any"))
I tried to get a list of files using Microsoft365R, but after accessing from IT, list_sharepoint_sites() returns an empty list.

Does file name matter in uploading files in autodesk-realitycapture files api

Once the files have been uploaded, in response I'm getting only .jpg as file name not the uploaded file name like below
"Files":{"file":[{"filename":".jpg","fileid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=-3679219-100000000","filesize":"3679219","msg":"No error"}]}
It is strange that you are not getting back the filename, but it should not really mater, as long as the filesize is correct - otherwise it is a sign that the file might be corrupted.
It would be interesting to know how you upload the file - maybe we could identify the couse of name stripping.

How to read a password protected .csv file from zip folder into R?

I need to read an encrypted .csv file from a zipped folder (.zip) into R.
My current code used to extract the file when it is decrypted and unzipped looks like this:
test_2017= as.data.table(read.csv("Raw Data/DATASET1_PART1.csv"))
The problem with this is that due to the size of the decompressd file, I am losing rows when I simply move it from the zip folder onto the regular drive. Therefore I need to read it directly from the zip folder.
Can anyone help?

read textfile with timestamp

I have a website that creates a txt file and saves it with a timestamp to the webserver directory.
I need a client based app to list all files in the directory to download to the client server for processing but cannot find a way to have them listed in a listbox without specifying the full file name
i.e. TB2014-09-08_11h48m25_765.txt is a full name. TB stays constant and the files are always .txt)
you want the GetFiles method in the Directory class (System.IO namespace). Something along these lines:
Dim files As String() = Directory.GetFiles("c:\YourFolder", "TB*.txt")
For Each filename In files
Console.WriteLine(filename)
Next

uploading files - how to store file in non public folder

I have problem with uploading files. I followed these instructions: http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html and everything is working fine, but I want to save uploaded files in a folder that is not public and with random name and then send it to the browser in original name.
I know how to put file in non public folder with random name and how to save original name to database, but what should I do next for getting this file content and send it to browser with original name? How to achieve that?
Store the hidden path in the database, then just read it in your php script that is public available and send your file to a user, if you don't how to send files in php, you can find it out here on stackoverflow.

Resources