Currently, I am using open_file: ^3.0.1 plugin for an open local disk file. But How to open any network file? I store the file on Firebase Storage and I read URL.
for Local File open
OpenFile.open(path);
I stored any type of file to firebase storage... And also I load all files from firebase storage. Users can open(view) these particular files
Example:
Url 1 = https://... - image
Url 2 = https:// - pdf
Url 3 = https:// -
word
One way of accessing files from a network is downloading the file to a temporary directory on your device. You can use flutter_downloader to achieve this. Once downloaded, you can read the file from the path.
But since you're using Firebase Cloud Storage, follow this guide to download the file. If you wish to only temporarily store the file, you can delete the file when not in use anymore.
Related
I listed all docx and pptx files from device storage now I want to open them using file path I tried different packages but I am getting a lot of issues can someone provide me a material related to opening document files or any package that can open files using file path thanks
You can try this package, it will open the files in default application from its path.
https://pub.dev/packages/open_file_plus
https://pub.dev/packages/open_file_plus
I am building a flutter app (iOS/Android/MacOS/Windows/Web) which is able to download files, selected by the user. But where should I save those files? On MacOS/Windows its easy using path_provider and get the path of the downloads folder.
But where should I save the files on the other platforms? The downloads folder would be perfect because the users are able to use those files (.pdf) even without using the app, so the files are not app specific.
If you wish to save in download directory you can use
Directory appDownloadDir = await getDownloadsDirectory();
String appDownloadPath = appDownloadDir.path;
Or
getExternalStorageDirectory()//android
getApplicationDocumentsDirectory()// ios doesnt support access to download folder
in a scheduler action i need to add files to FAL (to sys_file) which are already in the storage, uploaded via ftp. The normal way
storage->addFile(....)
which copies the file from a temporary folder to the file storage and adds it to the sys_file table does not work, because the file is already in the fileadmin directory. If i try i get this error message:
[ERROR] Cannot add a file that is already part of this storage.
How is it possible to add a file to sys_file which is already in fileadmin?
Thanks!
AFAIK addFile() is to be used for files uploaded from a local disk. If the files are already available on the remote server, you should go for addUploadedFile() instead.
Is it possible to lookup the audio metadata for a file stored in Google Cloud without having to download it? When building a Google Speech-to-Text API service you pass it a gs://bucket/file.flac, and I know the sox and ffmpeg bash and Python commands for locally stored files metadata lookup, but I can't seem figure out a way to lookup audio file metadata on Google Cloud Storage file.
Additionally if I have a gs://bucket/audio.wav, can I re-encode that using sox/py-sox and write the new audio.flac directly to gs://bucket/audio.flac? Or do I have to download the audio.wav to re-encode it?
Any thoughts or directions appreciated.
No, it is not possible to access the metadata you want directly in google Cloud Storage. Using the command gsutil ls -L gs://[bucket_name]/[file_name] will prompt the metadata of that file within the bucket. You can modify these metadata, but not the ones you are referring to. You will need to download the files, re-encode them and upload them again.
You cannot do that re-encoding operation in Cloud Storage, you will need to download the file and process it the way you want before uploading it again to your bucket. However, here is a workaround if it works for you:
Create a Cloud Function triggered when your file is uploaded. Then, retrieve the file that you just uploaded and perform any operation you want with it (such as re-encoding into .flac). After that, upload it again (careful! If you give the new file the same name and extension, it will overwrite the older one in the bucket).
About your library, Cloud Functions use Python 3.7, which for the time being does not support the py-sox library, so you will need to find another one.
I am trying to set up a private app store using azure. I'm trying to use azure blob storage for storing .ipa and .plist files.
here is the reference:http://gknops.github.io/adHocGenerate/
I am able to upload files to azure blob storage and the files are available in the container with container access(i am able to browse to the file in my mobile).
Now when I try to use itms-services and open the .plist files hyperlink it is throwing that "cannot connect to xxxxxxx.blob.core.windows.net". But when I open the links to my ipa and plist they are working.
All the urls(html, ipa nad plist) are https only and using a mobile network so there are no network restrictions.
ex:
I am uploading the stored file as: myFile_v2-1-6.ipa, myFile_v2-1-6.plist
I am referring it in html as
https://xxxx.blob.core.windows.net/xxxxxxx/myFile_v2-1-6.plist">
Can someone help me with this issue? Your help will be very much appreciated.
EDIT:
my html is there in https://xxxxxxxxx.azurewebsites.net
Azure Blob storage was working fine.it was the problem with my plist file.
i am editing it using XmlDocument and saving it, then XmlDocument adding braces [] to the DTD element because of which the plist file is corrupted and throwing this error.
took some to understand this and now i am removing the [] using string replace and using that plist file. app installation is all working fine.