Skip to content

upload() returns null #3

Description

@Luamnoxu

I've been trying to work my way around the API and I have a static HTML Page ready to go, uploading it manually does work fine

Problem is when doing

<?php 
require __DIR__ . '/../vendor/autoload.php';

use ReedJones\Neocities\Neocities;

$nc = new Neocities([
    'apiKey' => 'VERY-REAL-API-KEY'
]);
$result = $nc->upload(__DIR__.'/export/index.html');
dump($result);
?>

I end up getting null as a return value.
Ive verified that the file exists, doing file_get_contents(__DIR__.'/export/index.html'); does indeed give me the file contents so im unsure why this wouldnt work, only other thing i can think of is that this is being run on localhost

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions