URL to a file on my computer - url

how to create a url to a file on my computer that can be downloadable from everywhere something like:
http://111.111.11.11:80\Users\MYDESKTOP\Desktop/file.zip
or
https://111.111.11.11:443\Users\MYDESKTOP\Desktop/file.zip
or
ftp.111.111.11.11:21\Users\MYDESKTOP\Desktop/file.zip
is it possible?

Related

extract and read grib2 files from url with octave

how can we extract and read grib2 files from url with octave?
url like this: https://dd.meteo.gc.ca/model_gem_regional/10km/grib2/06/003/
thank you

Filename not assigned to csv export in HighCharts on Mac

I am using the EXPORT-CSV plugin for Highcharts to export data to csv. (Thank you to the developers of this plugin!) When testing in Safari on a Mac, however, the exported csv file does not take the filename as expected from
exporting: {
filename: "FancyFileName"
}
and instead just uses the default Highcharts name "chart". All the built-in export types do use the desired filename from Safari, and the csv also gets the desired filename from all the other standard browsers I have tested.
Here is a fiddle.
How can Safari be convinced to use the filename I give it? Thanks for your help.
The hard coded filename is coming from the php script written on the server. You can find that script on php script for download of file with hardcoded file name
You can use that same code on your local machine server. To do that
create a php file on your local server.
copy the above code in it.
change url www.highcharts.com/studies/csv-export/csv.php in export.csv library to your local server url.
change the name whatever you wish to using $_POST['variablename']
Variable name should be pass when making post call from export.csv library and use in php file using $_POST
Highcharts.post(url, {
data: content,
name: name,
type: MIME,
extension: extension
});
This is the code used in export.csv library for making post call. I have added extra parameter name to be used in my php script for dynamic filename.

How change file permissions (chmod) via FTP by ruby

I have some issue with changing CHMODs via FTP by ruby.
Sample of code:
ftp = Net::FTP.new('ftp.example.com')
ftp.login(ENV['FTP_USER'], ENV['FTP_PASS'])
ftp.chdir('/import')
ftp.mkdir(file_name)
ftp.chdir(file_name)
ftp.put(File.open(xml_file))
ftp.put(File.open(csv_file))
ftp.quit
I create a new directory and I upload two files into it. I must change CHMODs of new dir and files becouse other user can't remove it. I found something like that:
ftp.sendcmd("SITE CHMOD 777 filename")
but return this:
Net::FTPPermError: 502 SITE: Command not implemented.
Maybe someone knows how do that it?

FTP getbinaryfile by file extension?

I am using Net::FTP's getbinaryfile functionality to pull in a zip file with FTP. My system is not aware of the full file name, so I would simply like to search the folder for the zip file extension. Usually I would simply input the filename as *.zip. This does not seem to work.
ftp = Net::FTP.new(domain)
path = "#{Rails.root}/public/ftp/#{self.id}.zip"
ftp.getbinaryfile("*.zip", path)
I used the following code to return the zip file name in the FTP folder. Then using the same code as above, I was able to run getbinaryfile with the correct zip file name.
files = ftp.nlst("*.zip")
I use the following to get all zip files (I'm using SFTP but hopefully this will point you in the right direction)
Net::SFTP.start(domain, user, :password => 'pass') do |sftp|
sftp.dir.glob("/yourdirectory","*.zip").each do |file|
sftp.download!(file, "/local/spot")
end
end

VB6 - How to get Filename in AsyncRead Downloading Method?

I'm trying to download files which have no Normal [FILENAME].[EXTENSION] in URL, Using AsyncRead Downloading Method. There is no problem in Downloading process (It is Downloading file completely and save the file into Temp files). So i want to get Real Filename with Extension to save it to another place same as original file which is for downloading.
I can get file name while the URL is something like this:
Http://Host.com/Path/MyDoc.txt ( So i can get File name "MyDoc" and extension ".txt" easily because it specified at the URL )
But when downloading URL is something like this:
Http://Host.com/Path/download.php?File=9
I can not get the Real File name and Extension. Is there any way to get them on URLs like this?
Note: There is no problem in Downloading Process and I can download both of above files Completely. I Just want to get Filename and Extension.

Resources