File uploads from Google Drive using Safari on iPhone result in 0 byte files - iphone

We have a form on our website where you can apply for jobs, and it has a file upload field so you can upload your resumé. It allows .doc, .docx and .pdf files.
Sometimes the form submits successfully but the file is 0 bytes on our server.
I was able to figure out that all the form submissions that result in a 0 byte file upload were from iPhones, and by filling out the form myself on my iPhone, discovered that if the resumé is stored on Google Drive, and then I upload it via the form, that's what results in the 0 byte file.
If it's stored on iCloud Drive, then it's fine. It's an appropriately sized file that opens properly in the right application (Acrobat or Word).
Anybody have any suggestions as to how I can remedy the situation, or where to even start? I have Googled it extensively, and can't find any other discussion of this particular weirdness. Apologies if this is the wrong place to post the question, and I would appreciate pointers to the right place if necessary.

I'm afraid this is an iOS bug, still present in version 12.3.1 and dating back to at least 2016, we have the same issue. I think the only options that exist are: prevent the form being used on iOS, detect 0 byte files in server-side validation and ask the user to resubmit (not great but at least you're not losing data), or move to an AJAX-style file upload. See also this related issue.

Related

Providing EXIF-free images in a gallery or other webpage

First, thanks for any and all help regarding this topic.
Sites like Facebook and Twitter strip EXIF information from images as they are uploading. My goal is to allow users to upload images to our platform (working with Nextcloud and others) with full EXIF information, however, we need to display images that do not contain EXIF information or any metadata. Without stripping and creating a second, Exif-Free image for each, is it possible to simply hide that EXIF info so that, if a user downloads that image, the EXIF is not embedded?
We were told that the only way to do this is to have a second, exif-free copy (the order of when that's created is irrelevant pre/during/post upload). I'm hoping there's a way that we can simply display such a copy without doubling our physical space requirements.
Thanks again for your help.
Exif is metadata, along with IPTC, XMP, AFCP, ICC, FPXR, MPF, JPS and a comment, just for the JFIF/JPEG file format alone. Other picture file formats support even more/other metadata.
You wrote it yourself: a download - so it's a file in any case. Pictures are files, just like executables, movies, texts, music and archives are files, too. And metadata is part of its content, so whoever accesses the raw bytes of the file can grab everything in it. Which is not "please don't look" proof. If you
create that on the fly by stripping metadata everytime a download is requested,
or if you do it once to preserve performance and instead occupy space remains your decision.
If there would be something as simple as a "don't show" feature then it would still be in the file and could be extracted easily by software written to ignore that instruction. Seriously, there's no shortcut to that - do it properly and don't spare yourself from getting work done at the wrong end.

Download message from Google group

I need to download an archived google group.
Following link is one of the messages of that group for example.
https://groups.google.com/forum/#!topic/sci.aeronautics/ViFtpXfVm7M
The problem is, what i see in the browser does not appear in the downloaded webpage.
With my very limited knowledge, It seems to me like the reason behind it is this content is dynamically created by java-script. Or else, these downloaded files are with so called 'mbox' extension which is encrypted ?
What I've tried so far
First trys
Simple download
wget https://groups.google.com/d/topic/sci.aeronautics/ViFtpXfVm7M
With mirror
wget --mirror https://groups.google.com/d/topic/sci.aeronautics/ViFtpXfVm7M
Assuming its encrypted
With cookies.
wget --load-cookies=cookies.txt https://groups.google.com/d/topic/sci.aeronautics/ViFtpXfVm7M
Got thunderbird to setup my gmail and opening. did not open correctly
Assuming the content was javascript generated
Downloaded using phantomJS
https://askubuntu.com/questions/411540/how-to-get-wget-to-download-exact-same-web-page-html-as-browser
Downloaded using phantomJS with a different script
https://gist.github.com/giocomai/247d54e097b5083e2451
Used scripts available from Github
https://github.com/henryk/gggd
https://github.com/icy/google-group-crawler
But none did not work so far.
Can anyone please shed some light on how to download this page with its message as a readable html or txt file ?
Cheers
AyyoSalli
You could use https://groups.google.com/forum/feed/sci.aeronautics/msgs/atom.xml?num=100 to get some of the posts - but it only gets roughly half the posts in this case.
And it has all the messages from all topics together.
View it in Firefox or Classic Opera to see directly in a more human-readable form.
But since you say you already got a file in standard mbox format, what exactly is wrong with it - did you attempt to import it into a locally installed email or newsclient ? (like Thunderbird)

TinyMCE advimage Cannot read property 'responseText' of null

All of a sudden one of our sites has developed an issue with TinyMCE, specifically it seems, in relation to the advimage plugin.
When trying to browse the image folder via TinyMCE I get an alert with one of these errors:
In Chrome I get:
2can't process ajax,TypeError: Cannot read property 'responseText' of null
In Firefox I get:
2can't process ajax,Invalid XML structure
Nothing has changed on this site for a good few months.
We have upgraded to PHP 5.4 very recently, but I don't see why that would be related.
This could be an issue with overly large images in the plugin's upload directory.
On each request, the advimage plugin scans the upload directory (set in your config) and generates thumbnails of any images it finds in there, then sends a list of images off to the client in the form of JSON or XML. If an image is too large to process, (low server memory or something), then the process quits and doesn't return any JSON/XML, hence the seemingly unrelated error message.
Prune any images over 1MB from the uploads directory. You may need to flush the cached thumbs as well. To stop your users/admins from uploading huge images, set an upload limit in the plugins config.

Failed to display UIWebView to display docx/xlsx file with SFUZipEndOfCentralDirectoryError error with custom URL

We are writing some program to display documents on iOS. I think that there are a lot of confusion on the web about what type of documents which iOS UIWebView could display. Generally people refer to Technical Q&A QA1630 Using UIWebView to display select document types to see that all the MS office 07+ files (such as docx, xlsx, pptx) could not be displayed, however actually that is not what we see from testing. Actually we are able to display docx/xlsx/pptx document at UIWebView either loading from a remote URL, local file or in memory (loadData, here the baseURL can not be nil on simulator, see this link). Of course We are testing on latest version of iOS on iPhone simulator, it might be that the support was not at older iOS. At this point, We don't know that yet. If you know, please let me know.
However right now, We have one issue to display document at UIWebView by using custom URL for security reason. I did the custom URL by following the code here: protecting iOS resource. We could display xls, doc, ppt, pdf file, but not docx/xlsx/pptx, We got some error like this:
EXCEPTION SFUZipEndOfCentralDirectoryError: Could not find the end of central directory record
We tried to debug and could not figure what's to do here. Do you see similar error here? Could anyone shed some lights on this? Thanks very much.
It looks like the document you're trying to open might be corrupt. docx, xlsx, and pptx files are actually zip files containing a bunch of XML documents and other data. Check if you are able to uncompress the file on your computer by renaming it to .zip and then unzipping.

Xcode Project Size problem- 72 text files

I am new to iphone sdk and creating my first application so please be nice when answering my questions.
I have following questions
Q-1. I have created a simple iphone application (not a game app, no OPenGL). My program is running fine but total xcode project size is 9 mb. I found that my xcode project size is less than 2 mb without "class" and "build" folder.
Do we upload files of "build" and "class" folder when we submit our application?
I have checked that most of iphone applications are less than 2 mb in size so I think build folder is just for me to test the application.
Can someone give me the list of all files or folders (just extension) that we need to upload in order to submit an iphone application.
Q-2. there are around 72 text files (each is 2 KB in size) in my program. Program open a text file according the selected criteria. I have all 72 text files in resource folder. I am not using SQLite as I think it is not too much data and text files are small in size.
Can apple reject my application just because there 72 text files? Is it a common approach to use multiple text files instead of SQLite?
Q-3. Do I need to add zip and unzip my text files instead of opening them directly?
Q-4. some of my text files has following five words
"sex" "sexy" "kinky" "filthy" "dirty"
For example "You are so kinky" , "I love sex" etc.
Do I need to remove these words from my files? Will they be considered vulgar? Will my application be rejected because of these five words?
I have seen some iphone applications on apple's website which shows sex positions and use words like sex,sexy,kinky so I think it should not be a problem.
Do I need to add something like "mature content. Must be 18 years old" just because I am using these five words. I think these are pretty common words that are frequently used by young people.
Many of these questions can be answered more completely by Apple's help docs in the iOS developer center and iOS Provisioning Portal (https://developer.apple.com/devcenter/ios/index.action and https://developer.apple.com/ios/manage/distribution/index.action - you need to be logged in to view these links)
However, here are some quick answers:
1) The build and classes folder hold files during development. The build folder holds the binaries that are created every time you click 'Build' in Xcode, if you build for different targets, there will be multiple copies of your binary in this folder. It also contains various debugging and symbol files used by Xcode.
The classes folder contains all of the implementation (.m) and header files (.h) that you have in your project. This folder corresponds to the 'Classes' group in the file organizer when you open your project in Xcode.
When you submit an application to Apple, all you submit is the compiled binary (found in the appropriate folder in your 'build' folder). It is normal for your project folder to be many times bigger than the final binary you submit. For more info on the submission process, refer to the second link I posted above.
2) If you're persisting a lot of data, I would recommend using the built in SQLite database. It's very easy to use (Google will help you with this), and quite fast. Apple probably won't reject your app for storing a lot of data in flat text files, but you have no reason to. SQLite databases are much cleaner and easier to maintain than 72 flat files.
3) No. But you should still use SQLite, especially if you're saving enough data to these text files that they need to be compressed. Reading and parsing large text files can be much slower and more cumbersome than reading the same data from a database (databases are made to handle data storage like this).
4) Again, Apple probably won't reject you for this (of course, nobody actually knows why they reject apps, so it's always a bit of a crap shoot). When you submit your app, you can choose the rating level for it (sort of like game ratings, or movie ratings) so when people download it they are aware of the level of maturity of the content. One of the ratings is 17+, which you can use if you need. I believe Apple has a document outlining it's rating system in one of the links I posted above (or it's somewhere, it does exist).
First of all you don't need to upload build folder to upload but classes will be uploaded. you have to follow a process for uploading.
No problem at all you can upload even 1000 files, 72 is very small amount. but be careful that if you project is very heavy then it app will be crashed.
No need to zip the files.
you may use all of these words you may even use pornographic contents but they should not be copy righted of any body else. You don't need to remove them, when you will be uploading your application there will be an option "Application include adult contents" you just have to check that option.