Direct upload of Video to Vimeo - wordpress

I'm trying to upload directly to Vimeo from my computer in a Wordpress site using $lib->upload($_FILES["fileToUpload"]["tmp_name"], false); but it keeps failing. Plus it can't upload large files above 1MB,target is to allow users to upload upto 100MB in a single upload

Most of the conversation happened in the comments above, but I'm adding an answer here anyway.
The video was being uploaded successfully, the problem was that the video was returning as "untitled".
To edit a video you need to perform the API call $lib->request($video_uri, ['name' => $title], 'PATCH');, and ensure your token has the edit scope.

Related

Google Form submit issue

When I was trying submit my google form or upload a file, I see that "There is a problem. Please try again.."
This issue only gets fixed when my Google Cloud is cleared.
Why can't I fill out a form when my account's storage is full?
The process of the file upload of Google Form works as follows:
File is uploaded to your (respondent's) Google Drive
Ownership is transferred to the form owner
Sharing is removed from you
As you could see, you are required to have enough space to upload the file to your Google Drive.

rackspace cloudfiles delay before on CDN after upload

I am implementing rackspace cloudfiles for a site. If a user uploads a profile image we want to store it on cloudfiles in a CDN enabled container. This works only it takes a couple of secs before the file is available on the CDN.
So when you upload your profile -> we store it in cloud -> reload the page it often isn't available yet resulting in a broken image.
Has anybody experienced this issue and if so how did you work around it?
Yes,this is a function of how CDN's work.
The CDN (in the case of RackSpace, Akamai) must become aware of your content, so it takes some time for your content to show up on a CDN (usually just a matter of minutes).

How to avoid "Video not found or access denied" error for anonymous users in a Drupal video sharing site?

I have a web application in Drupal 6 that shows video content to users. Currently if I as an admin create a video node and upload the video, can see the video (and playback).
However if I am an anonymous user, I am unable to do any sort of playback even though I can access the video node. When I hit play in the JW player, I get a "Video not found or access denied" error even though I have made the video a public video. The path that I get along with the player is one that is incorrect as it has a "system" in it so my player is unable to play it.
What can i do to make sure that the uploaded files share the same permissions as the video node. So that if a user can see a video, they should be able to able to play it.
I went to admin -> file settings and changed the setting to Private so that Drupal controls the file system. Now an anonymous who does not have access to watch the video CANNOT see the player which is cool however they still cannot play the video on nodes they should have access to.
Any ideas guys?
Maybe you should provide more details about what modules you have enabled. If you do set a private download method (completely understandable), you may need to implement the file download hook.
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_file_download/6

How to hide url of the embedded mov files in drupal using swftools?

How can I hide or obfuscate the url of the embedded mov files in drupal using swftools and flowplayer 3 as the video player.
I tried using SWFObject2 but infact it outputs the url very clearly.
The site is basically a online video selling site, so I want to be able to prevent users to download the videos on their computer.
You could encrypt the video name, so instead of www.yoursite.com/sites/all/files/myvideo.flv you have www.yoursite.com/sites/all/files/fue8rughht94rjfieiwkdnd9tzdhezfh3993. This simply gets stored into the database and when called, you need to decrypt it.
Alternativly, you can have a singe entry file like access that takes the video name you want to show to the user like access?vid=myvideo.flv. This way, you can check more easily if the user has the permission to download the video.
I know this is not very Drupal related but this would require a custom approach anyway.

How do you show a preview image when allowing file uploads in ASP.NET?

Here is the functionality I want:
User selects an image from their machine, hits an Upload button (or better yet the following fires on the onchange event of the file input), and is able to see a preview of the image they are about to upload.
Here is the current workflow I am using, but it seems suboptimal:
I have an image control, a file input control and a submit button control. When the submit button is clicked, the codebehind handles the OnClick event and loads the image from the file input element. It then stores it into a temporary folder on the web server and sets the image control's ImageUrl to point to it.
This works, but results in me having to do a lot of janitorial duty in cleaning up these temporary images. Is there a cleaner workflow for doing this?
If you have memory to burn:
cache the image bytes in memory
set your ImageUrl to an image handler (.ashx) with some sort of cache identifier
serve the image bytes from cache
if the user cancels or leaves, discard the cached bytes
if the user accepts, write the cached bytes to their final destination
You should upload and rename the image to match some sort of ID for your current record. Then, when you upload a new file, delete any old ones first, all in the codebehind.
If you are only showing a thumbnail, you should try to use an image library to resize the image before saving. This will save on bandwidth and storage space.
I am assuming that the problem you are trying to solve is for your application to have the ability to preview the image before the user commits to that image. Your current approach has many advantages but one disadvantage is orphaned image files in a temporary directory if the user previews several images before committing or abandons the operation all together.
I've noticed several popular social networking sites using a different approach. Basically, a Java applet is used to do the preview operation on the user's local machine. The only file uploaded to the server is what the user commits to. That approach solves the problem that you are running into; however, it introduces the new problem of requiring Java to be installed on the local machine and integrated with the web browser.
you can create a small executable to delete files on* that temporary folder, and attach it to a schedule task so it will clean your temp. folder once in a while. But I don't know if you're hosting on a dedicated server or shared hosting because with shared hosting, this doesn't work
and is able to see a preview of the image they are about to upload
...
When the submit button is clicked, the codebehind handles the OnClick event and loads the image from the file input element. It then stores it into a temporary folder on the web server and sets the image control's ImageUrl to point to it.
Imagine this conversation:
Jim: I don't know if I can afford to drive my car to work today.
Bob: Why don't you just drive to work? When you pay for it, you'll know if you can afford it or not!
Jim: Awesome!
You've just uploaded the file to show them the preview of the file they're about to upload...
While this will undoubtedly work fine if your users are uploading small images over fast connections, when someone tries to upload a 3 meg JPEG over a slow connection, and then wonders why their webpage locked up from selecting a file (they didn't even press submit remember, so you've effectively locked them up 'randomly'), you may wish to re-evaluate this as a solution.
To actually display the image before it gets uploaded, you will need to use some kind of flash or silverlight object (or perhaps a java applet) which can produce a thumbnail of the local file on the user's local disk, before it gets sent to the server. As ugly as this may sound, there literally is no way to do it without some client side plugin.

Resources