Comments (2)
You can check how we unit test it here. Does it help, or you need something different?
from moxie.
Thanks a lot. I did not know I could provide my own File with the Flash runtime. Here's my code, might it help others with their testing:
window.mockFileUpload = function (fileName, fileType, content) {
var file;
fileName = fileName || 'test.svg';
fileType = fileType || 'image/svg+xml';
content = '<svg xmlns="http://www.w3.org/2000/svg"></svg>';
file = new window.mOxie.File(null, {
name: fileName,
type: fileType,
size: content.length,
data: content
});
window.myProductionCodeUploadHandler(file);
};
from moxie.
Related Issues (20)
- Flash FormData upload to S3 generates duplicate filename param and bombs out upload
- RangeError: Maximum call stack size exceeded - moxie.js - 1974
- preview picture in ie8 HOT 1
- A lot of Preview image cause memory leak HOT 6
- mOxie .onload is not executed in plupload >= 2.2.0 HOT 2
- Bug. Runtime flash and plupload.addFile() not working HOT 2
- mOxie namespace gone? v1.5.3 HOT 14
- Can't get the size of a gif image? HOT 3
- Infinite events cycle on Angular 2 + IE9 HOT 12
- Suggestion: Modifying the XMLHttpRequest Api HOT 2
- Headers not sending on IE9 with flash HOT 5
- How to get a blob as dataurl? HOT 2
- How to install it with flash? HOT 1
- Flash Runtime support put http request? HOT 1
- Image preview error HOT 2
- File picker - multiple files. HOT 2
- In IPv6 environment, it is impossible to upload files normally
- Hide the visually hidden file input from assistive technologies
- Flash losing support in Chrome at the end of 2020. Future plans..? HOT 1
- Inefficient regular expression (js/redos)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moxie.