There are 3 files uploaded to Sharefile using Sharefile API. 2 of which are PDF's and named slightly different. Since 11/2/2020 both the pdf's are showing up uploaded as one (the names are concatenated with a comma) they used to be uploaded as 2 different files as their filenames are appended with _App or _Qte at the end. Example: Jane_Doe_100-1_HO_10-20-2020_App-8625.pdf,Jane_Doe_100-1_HO_10-20-2020_Qte-8625_4112020082002.pdf
Is anybody else have this problem. Sharefile support has been contacted and they said they do not support API calls.
We haven't made any changes to the code. Thanks in advance for the help.
What I had to do was split the upload proc into 2 and upload each file separately. Although Sharefile API allows\uses Multipart Form DataStream to enable sending files of the same type/extension as part of one stream, it seems they no longer upload the files separately. So I had to upload both the pdf files seperately.
Related
Can anyone answer a question for me? I want to know if I'm using pinata correctly. I created a small collection (50 images). Of course there are corresponding .json files for the metadata of each image. I uploaded the 50 images to pinata, then wrote a script that updated the .json files, so the metadata points to the ipfs location for each image. I finally uploaded the 50 .json files to pinata as well. Therefore, the images and the corresponding .json files have different CIDs. Is this the correct way to do this. I'm asking because my images are not showing on testnets.opensea.io. My nft contract sets the base uri to the CID of the metadata files (.json files).
What I usually do is upload a folder containing the JSON metadata of the nfts, so that each file is pointing to the same base URI. Then just set your contract to point your nfts to that base URI, and then just add the nft id to the end. If your JSON has the necessary properties, it should show up correctly on opensea. Be sure that each metadata points to its corresponding image.
I'm trying to build a sample app in Wit.AI, with a lot of entity values and expressions. Thus, to create that app manually is not an option.
I've tried their "import" feature, but it seems it doesn't work very well or it might be very capricious about the zip. The things I've done and nothing gave a result:
Download a zip from another app in my account
Change the zip command in order to work for the new app
The changed files are expressions.json and a single file in the entities folder, describing an user-defined entity.
Zip the whole folder in order to preserve the structure of the ZIP
Nevertheless how many approaches I've tried (format the JSON and etc.) nothing worked! The server returns 400 Bad Request response.
Further, I've tried with their Web API, but to no avail again. When I'm updating the values of an entity the server responses with Success, the response doesn't contain the new values...
I've checked this article Error importing app from backup on wit.ai and many others as well as some issues on GitHub, but again...nothing helped ;)
So, if anyone could help on that...He/she gets a beer! :)
When you create a new app, you can simply upload the the zip file in Import your app from a backup, and create the new app.
To be sure to not include any redundant files in the app zip file, it is important to use the following to zip app files:
zip AppName.zip AppName/app.json AppName/entities/*.json AppName/expressions.json
and upload AppName.zip.
Note that, the name of new app, zip file, and app name in app.json file, all should be the same (here AppName).
The PDF files are in my Google Drive. I just got that I can get the number of pages of a PDF sending it as a job to Cloud Print, because Cloud Print will return a JSON object with "numberOfPages" attribute.
Is there any faster and easier way? Thanks in advance.
Well, I actually did like I said.
I take my file, then send it to CloudPrint via its JSON Api. I need to send it to a dummy printer, a printer I registered in CloudPrint but actually is never connected to Internet. Then, I get the number of pages of the PDF file in the value of response's "numberOfPages" attribute. Save this number in some var. Finally, I send a delete petition to JSON Api for my file in the dummy printer, indeed isn't necessary at all.
Thanks!
Am created one apps for ipad.. its already have view part.. In that am integrated google drive for list files. After listing when the user clicks to view files its going to download and then viewed by user.
Upto complete download user cant open the book. If that file content too large it takes too much time. Is it there any other way when user click file to open instantly.. or it shows 2 or 3 pages first after that remaining pages loads in background.
You have 2 choices. For instance you could download the content pieces by pieces using the Range HTTP header. The other possibility is to stream the response object (in Java I would do that by reading bytes in the InputStream of the response as they come). Too bad my lack of Objective-C skills don't allow me to help you further.
I have a client that's been struggling with slow loading pdf files on the web.
My client has some very large pdf files that are almost 10 Mb. They take upwards of 3-4 minutes to download. The files will not display until the whole file is loaded.
We and they have seen other's sites where the pdfs load one page at a time, so the end user can start looking at the file as the rest of the page is still loading in the background. Gives the illusion that the page has loaded faster.
According to the documentation they see, IIS 6 should automatically do this if the pdf file is created with “Optimized for fast web view” checked. It is checked, and the file will still not load a page at a time.
They have searched and found nothing other than IIS will do this automatically if the file is saved correctly.
How can they "stream" the pdf? Is this because the pdf's were saved in a special way? Is this a java script that handles the download? Or is there a change that needs to happen in IIS?
Thanks
Update:
The file starts out like this:
%PDF-1.4
%âãÏÓ
171 0 obj << 0/Linearized 1
Linearized?
The PDF document isn't being served up from an aspx/asp page. (It's just posted directly to the site and linked to).
You need to lineraize the PDF and not trust IIS to do this for you.
There are a number of apps that will do this for you. I have used CVision (thier compression is 2nd to none, but the licensing and SDK are a pain), there is also some cheaper alternatives here, but I dont know how well they work.
To clarify Tony's point... (I think)
If you have actually used these tools and your pdf is linearized, try converting the PDF to a byte array and Response.Write() the byte array (with content headers, etc) to the client (in a new browser window or frame)
Would it be possible to use a third party service, like Scribd? If you go this route you can embed their streaming viewer onto your client's website. Just a thought, although I know it's not really suitable for every type of business.
This might happen if you are serving the PDF from an aspx page, to get the byte-serving that linearized pdf's need the page needs to be served directly or you need to provide the byte serving from the aspx code.
Save one of the files and open it up in a text editor. If you don't see something like
<< /Linearized 1.0 /L <number> /H [<number> <number>] /O <number> /E <number> ...
in the first couple hundred bytes or so, then you're not getting a linearized (ie, fast web) PDF.
First, the document needs to be "linearized", as others have explained; you can linearize it in Acrobat or using pdfopt from Ghostscript. Second, the web server must be able to serve byte ranges (i.e., support the Range header); I have no idea how to configure IIS for this, but even if the document is linearized, the client has to be able to read particular byte ranges.